Update README.md
Browse files
README.md
CHANGED
@@ -92,7 +92,8 @@ widget:
|
|
92 |
|
93 |
**Ǎguila-7B** is a transformer-based causal language model for Catalan, Spanish, and English.
|
94 |
It is based on the [Falcon-7B](https://huggingface.co/tiiuae/falcon-7b) model and has been trained on a 26B token
|
95 |
-
trilingual corpus collected from publicly available corpora and crawlers.
|
|
|
96 |
|
97 |
|
98 |
## Intended uses and limitations
|
@@ -105,29 +106,24 @@ However, it is intended to be fine-tuned for downstream tasks.
|
|
105 |
Here is how to use this model:
|
106 |
|
107 |
```python
|
108 |
-
import
|
109 |
-
from transformers import
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
torch_dtype=torch.bfloat16,
|
120 |
-
trust_remote_code=True,
|
121 |
-
device_map="auto",
|
122 |
)
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
eos_token_id=tokenizer.eos_token_id,
|
128 |
)
|
129 |
-
|
130 |
-
print(f"Result: {generation[0]['generated_text']}")
|
131 |
```
|
132 |
|
133 |
## Limitations and bias
|
|
|
92 |
|
93 |
**Ǎguila-7B** is a transformer-based causal language model for Catalan, Spanish, and English.
|
94 |
It is based on the [Falcon-7B](https://huggingface.co/tiiuae/falcon-7b) model and has been trained on a 26B token
|
95 |
+
trilingual corpus collected from publicly available corpora and crawlers. This is a quantized version using ct2-transformers-converter,
|
96 |
+
as in [michaelfeil/ct2fast-falcon-7b] (https://huggingface.co/michaelfeil/ct2fast-falcon-7b)
|
97 |
|
98 |
|
99 |
## Intended uses and limitations
|
|
|
106 |
Here is how to use this model:
|
107 |
|
108 |
```python
|
109 |
+
from hf_hub_ctranslate2 import TranslatorCT2fromHfHub, GeneratorCT2fromHfHub
|
110 |
+
from transformers import AutoTokenizer
|
111 |
+
|
112 |
+
model_name = "crodri/aguila_quantized"
|
113 |
+
# use either TranslatorCT2fromHfHub or GeneratorCT2fromHfHub here, depending on model.
|
114 |
+
model = GeneratorCT2fromHfHub(
|
115 |
+
# load in int8 on CUDA
|
116 |
+
model_name_or_path=model_name,
|
117 |
+
device="cuda",
|
118 |
+
compute_type="int8_float16",
|
119 |
+
# tokenizer=AutoTokenizer.from_pretrained("tiiuae/falcon-7b")
|
|
|
|
|
|
|
120 |
)
|
121 |
+
outputs = model.generate(
|
122 |
+
text=["El millor de Barcelona es "],
|
123 |
+
max_length=512,
|
124 |
+
include_prompt_in_result=False
|
|
|
125 |
)
|
126 |
+
print(outputs)
|
|
|
127 |
```
|
128 |
|
129 |
## Limitations and bias
|