File size: 1,607 Bytes
5d3871d
 
 
 
 
 
 
 
 
 
 
 
 
99cf65c
 
5d3871d
 
 
 
 
 
 
 
 
bf2f5ca
 
5d3871d
bf2f5ca
99cf65c
bf2f5ca
 
99cf65c
 
 
 
 
 
 
 
 
 
bf2f5ca
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
99cf65c
a404080
5d3871d
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
66
---
license: apache-2.0
tags:
- finetuned
- mlx
pipeline_tag: text-generation
inference: true
widget:
- messages:
  - role: user
    content: What is your favorite condiment?
---

# versae/filiberto-7B-instruct-exp1
This model was converted to MLX format from [`mistralai/Mistral-7B-Instruct-v0.2`](https://hf.co/mistralai/Mistral-7B-Instruct-v0.2) using mlx-lm version **0.9.0**.
Refer to the [original model card](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2) for more details on the model.
## Use with mlx

```bash
pip install mlx-lm
```

```python
from mlx_lm import load, generate
model, tokenizer = load("versae/filiberto-7B-instruct-exp1")
```

### OCR correction

```python
text = """Otra vez, Don Iuan, me dad,
y otras mil vezes los braços.
Otra, y otras mil sean lazos
de nuestra antigua amistad.
Como venis?
Yo me siento
tan alegre, tan vfano,
tan venturoso, tan vano,
que no podrà el pensamiento
encareceros jamàs
las venturas que posseo,
porque el pensamiento creo"""

prompt = f"""<s>[INST] Dado el siguiente texto OCR, corrige los fallos que encuentres y devuelve el texto corregido:

{text} [/INST]"""

response = generate(model, tokenizer, prompt=prompt, verbose=True)
```

### Stanza identification

```python
text = """Alcázares finjo más altos que montes;
escalo las bóvedas de ingrávido tul
asida a las ruedas de alados Faetones;
ensueño quimeras; oteo horizontes
de nieve, de rosa, de nácar, de azul."""

prompt = f"""<s>[INST] Indique el nombre de la siguiente estrofa:

{text} [/INST]"""

response = generate(model, tokenizer, prompt=prompt, verbose=True)
```