riccorl commited on
Commit
6e5acd0
1 Parent(s): 3254c21

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +32 -0
README.md ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ language:
4
+ - it
5
+ ---
6
+
7
+ # Modello Italia 9B
8
+
9
+ HF-compatible version of Modello Italia 9B, developed by iGenius.
10
+
11
+ ```python
12
+ import torch
13
+ import transformers as tr
14
+
15
+ tokenizer = tr.AutoTokenizer.from_pretrained("riccorl/Modello-Italia-9B")
16
+ model = tr.AutoModelForCausalLM.from_pretrained("riccorl/Modello-Italia-9B", device_map="auto", torch_dtype=torch.bfloat16)
17
+
18
+ MY_SYSTEM_PROMPT_SHORT = (
19
+ "Tu sei Modello Italia, un modello di linguaggio naturale addestrato da iGenius."
20
+ )
21
+ prompt = "Ciao, chi sei?"
22
+ messages = [
23
+ {"role": "system", "content": MY_SYSTEM_PROMPT_SHORT},
24
+ {"role": "user", "content": prompt},
25
+ ]
26
+ tokenized_chat = hf_tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt")
27
+ out = model.generate(tokenized_chat.to("cuda"), max_new_tokens=200)
28
+ ```
29
+
30
+ License: MIT(?)
31
+
32
+ License PDF: https://secure.igenius.ai/legal/italia_terms_and_conditions.pdf