Update README.md
Browse files
README.md
CHANGED
@@ -123,11 +123,12 @@ To install `sentencepiece` run `pip install sentencepiece bitsandbytes`
|
|
123 |
|
124 |
```python
|
125 |
from transformers import M2M100ForConditionalGeneration, M2M100Tokenizer
|
|
|
126 |
|
127 |
hi_text = "जीवन एक चॉकलेट बॉक्स की तरह है।"
|
128 |
chinese_text = "生活就像一盒巧克力。"
|
129 |
|
130 |
-
model = M2M100ForConditionalGeneration.from_pretrained("ikeno-ada/m2m100_418-mt-bitsandbytes-4bit")
|
131 |
tokenizer = M2M100Tokenizer.from_pretrained("ikeno-ada/m2m100_418-mt-bitsandbytes-4bit")
|
132 |
|
133 |
# translate Hindi to French
|
|
|
123 |
|
124 |
```python
|
125 |
from transformers import M2M100ForConditionalGeneration, M2M100Tokenizer
|
126 |
+
import torch
|
127 |
|
128 |
hi_text = "जीवन एक चॉकलेट बॉक्स की तरह है।"
|
129 |
chinese_text = "生活就像一盒巧克力。"
|
130 |
|
131 |
+
model = M2M100ForConditionalGeneration.from_pretrained("ikeno-ada/m2m100_418-mt-bitsandbytes-4bit",device_map= "auto",torch_dtype=torch.bfloat16)
|
132 |
tokenizer = M2M100Tokenizer.from_pretrained("ikeno-ada/m2m100_418-mt-bitsandbytes-4bit")
|
133 |
|
134 |
# translate Hindi to French
|