bloom-7b-rl
This is a reinforcement learning enhanced bloom model (bloom-rl), fine-tuned based on bloom-7b (Muennighoff et al.).
Usage
If you don't have a good GPU (mem > 20G) then use the code below:
# pip install -q transformers accelerate
from transformers import AutoModelForCausalLM, AutoTokenizer
checkpoint = "hongyin/bloom-7b-rl"
tokenizer = AutoTokenizer.from_pretrained(checkpoint)
model = AutoModelForCausalLM.from_pretrained(checkpoint)
inputs = tokenizer.encode("Translate to Chinese: I love you.", return_tensors="pt")
outputs = model.generate(inputs)
print(tokenizer.decode(outputs[0]))
Translate to Chinese: I love you. 翻译:我爱你
If you have a good GPU (mem > 20G) then use the code below:
# pip install -q transformers accelerate
from transformers import AutoModelForCausalLM, AutoTokenizer
checkpoint = "hongyin/bloom-7b-rl"
tokenizer = AutoTokenizer.from_pretrained(checkpoint)
model = AutoModelForCausalLM.from_pretrained(checkpoint, torch_dtype="auto", device_map="auto")
inputs = tokenizer.encode("Translate to Chinese: I love you.", return_tensors="pt").to("cuda")
outputs = model.generate(inputs)
print(tokenizer.decode(outputs[0]))
Translate to Chinese: I love you. 翻译:我爱你
Bibtex entry and citation info
Please cite if you find it helpful.
@article{zhu2023metaaid,
title={MetaAID 2.0: An Extensible Framework for Developing Metaverse Applications via Human-controllable Pre-trained Models},
author={Zhu, Hongyin},
journal={arXiv preprint arXiv:2302.13173},
year={2023}
}