Update README.md
Browse files
README.md
CHANGED
@@ -37,24 +37,33 @@ The inference can be done using the following snippet of code:
|
|
37 |
```python
|
38 |
import transformers
|
39 |
|
40 |
-
model_id = ("cjvt/GaMS-1B
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
```
|
|
|
58 |
## Training details
|
59 |
|
60 |
### Training data
|
|
|
37 |
```python
|
38 |
import transformers
|
39 |
|
40 |
+
model_id = ("cjvt/GaMS-1B")
|
41 |
+
|
42 |
+
pline = pipeline(
|
43 |
+
"text-generation",
|
44 |
+
model=model_id,
|
45 |
+
device_map="auto"
|
46 |
+
)
|
47 |
+
|
48 |
+
prompts = [
|
49 |
+
"The examples of antonyms are:\nhigh => low\nwide => narrow\nbig =>",
|
50 |
+
"Pristanek je bil prvi nadzorovani spust ameriškega vesoljskega plovila na površje Lune po Apollu 17 leta 1972, ko je na Luni pristala zadnja Nasina misija s posadko.\nDoslej so na Luni pristala vesoljska plovila le iz štirih drugih držav –",
|
51 |
+
"U četvrtak je bila prva polufinalna večer Dore, a komentari na društvenim mrežama ne prestaju. U nedjeljno finale prošli su:"
|
52 |
+
]
|
53 |
+
|
54 |
+
sequences = pline(
|
55 |
+
prompts,
|
56 |
+
max_length=1000,
|
57 |
+
do_sample=False,
|
58 |
+
num_return_sequences=1
|
59 |
+
)
|
60 |
+
|
61 |
+
for seq in sequences:
|
62 |
+
print("--------------------------")
|
63 |
+
print(f"Result: {seq[0]['generated_text']}")
|
64 |
+
print("--------------------------\n")
|
65 |
```
|
66 |
+
|
67 |
## Training details
|
68 |
|
69 |
### Training data
|