laurentiubp
commited on
Update README.md
Browse files
README.md
CHANGED
@@ -39,15 +39,21 @@ The model achieves a loss rate of 1.4608 on the validation dataset after one epo
|
|
39 |
See the snippet below for usage with Transformers:
|
40 |
|
41 |
```python
|
42 |
-
|
43 |
-
|
44 |
|
45 |
-
|
46 |
|
47 |
-
|
48 |
-
"text-generation",
|
|
|
|
|
|
|
49 |
)
|
50 |
-
|
|
|
|
|
|
|
51 |
```
|
52 |
|
53 |
|
|
|
39 |
See the snippet below for usage with Transformers:
|
40 |
|
41 |
```python
|
42 |
+
import transformers
|
43 |
+
import torch
|
44 |
|
45 |
+
model_id = "catallama/CataLlama-v0.1-Base"
|
46 |
|
47 |
+
pipeline = transformers.pipeline(
|
48 |
+
"text-generation",
|
49 |
+
model=model_id,
|
50 |
+
model_kwargs={"torch_dtype": torch.bfloat16},
|
51 |
+
device_map="auto",
|
52 |
)
|
53 |
+
|
54 |
+
outputs = pipeline("Ei com estàs avui?")
|
55 |
+
|
56 |
+
print(outputs[0]["generated_text"][len(prompt):])
|
57 |
```
|
58 |
|
59 |
|