riccorl's picture
Create README.md
6e5acd0 verified
|
raw
history blame
915 Bytes
metadata
license: mit
language:
  - it

Modello Italia 9B

HF-compatible version of Modello Italia 9B, developed by iGenius.

import torch
import transformers as tr

tokenizer = tr.AutoTokenizer.from_pretrained("riccorl/Modello-Italia-9B")
model = tr.AutoModelForCausalLM.from_pretrained("riccorl/Modello-Italia-9B", device_map="auto", torch_dtype=torch.bfloat16)

MY_SYSTEM_PROMPT_SHORT = (
  "Tu sei Modello Italia, un modello di linguaggio naturale addestrato da iGenius."
)
prompt = "Ciao, chi sei?"
messages = [
  {"role": "system", "content": MY_SYSTEM_PROMPT_SHORT},
  {"role": "user", "content": prompt},
]
tokenized_chat = hf_tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt")
out = model.generate(tokenized_chat.to("cuda"), max_new_tokens=200)

License: MIT(?)

License PDF: https://secure.igenius.ai/legal/italia_terms_and_conditions.pdf