File size: 1,978 Bytes
d2abbc2 67aebae a582dc5 67aebae a582dc5 67aebae a582dc5 67aebae a582dc5 67aebae a582dc5 67aebae a582dc5 67aebae a582dc5 67aebae a582dc5 d2abbc2 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
---
language:
- en
- zh
pipeline_tag: text-generation
---
## chatbloom-7b
This is a RLHF enhanced bloom model (chatbloom), fine-tuned based on bloom-7b (Muennighoff et al.). This model only uses English QA datasets for RLHF training, which improves the understanding and generation of English.
### Usage
If you don't have a good GPU (mem > 20G) then use the code below:
```python
# pip install -q transformers accelerate
from transformers import AutoModelForCausalLM, AutoTokenizer
checkpoint = "hongyin/chatbloom-7b"
tokenizer = AutoTokenizer.from_pretrained(checkpoint)
model = AutoModelForCausalLM.from_pretrained(checkpoint)
inputs = tokenizer.encode("Paraphrasing the text: I love you.", return_tensors="pt")
outputs = model.generate(inputs)
print(tokenizer.decode(outputs[0]))
Original ouput: Paraphrasing the text: I love you. I love you. I love you. I love
ChatBloom ouput: Paraphrasing the text: I love you. I am a good person.
```
If you have a good GPU (mem > 20G) then use the code below:
```python
# pip install -q transformers accelerate
from transformers import AutoModelForCausalLM, AutoTokenizer
checkpoint = "hongyin/chatbloom-7b"
tokenizer = AutoTokenizer.from_pretrained(checkpoint)
model = AutoModelForCausalLM.from_pretrained(checkpoint, torch_dtype="auto", device_map="auto")
inputs = tokenizer.encode("Paraphrasing the text: I love you.", return_tensors="pt").to("cuda")
outputs = model.generate(inputs)
print(tokenizer.decode(outputs[0]))
Original ouput: Paraphrasing the text: I love you. I love you. I love you. I love
ChatBloom ouput: Paraphrasing the text: I love you. I am a good person.
```
## 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}
}
```
---
license: other
--- |