Downloads · 30 days
0
andreabac3/Open_Fauno-Italian-LLM-7B
Open_Fauno-Italian-LLM-7B is a machine learning model from andreabac3. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as gpl-3.0.
Downloads · 30 days
0
Access
Public
Updated Jul 12, 2023
Repo size
71.7 MB
Likes
2
Public
Click a slice to open those files.
.bin71.7 MB · 100%
From the Hugging Face model README

Get ready to meet Fauno - the Italian language model crafted by the RSTLess Research Group from the Sapienza University of Rome.
The talented research team behind Fauno includes Andrea Bacciu, Dr. Giovanni Trappolini, Andrea Santilli, and Professor Fabrizio Silvestri.
Fauno represents a cutting-edge development in open-source Italian Large Language Modeling. It's trained on extensive Italian synthetic datasets, encompassing a wide range of fields such as medical data 🩺, technical content from Stack Overflow 💻, Quora discussions 💬, and Alpaca data 🦙 translated into Italian.
Hence, our model is able to answer to your questions in Italian 🙋, fix your buggy code 🐛 and understand a minimum of medical literature 💊.
<br> This version of Fauno is based on OpenLLaMa!
Discover the capabilities of Fauno and experience the evolution of Italian language models for yourself.

We started with a model called Baize, named after a legendary creature from Chinese literature. Continuing along this thematic line, we developed our Italian model based on Baize and named it Fauno, inspired by an iconic figure from Roman mythology. This choice underlines the link between the two models, while maintaining a distinctive identity rooted in Italian culture.
Follow this link to access a Colab notebook with our 7B version! <a target="_blank" href="https://colab.research.google.com/drive/1AepJVWS-qU910zyq-Zi7wWFQ5tthVzUe"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> </a>
Fauno is a fine-tuned version of the LoRa weights of Baize, that is an improved version of LLama.
We translated and cleaned the data of Baize, and then we fine-tuned the 7b model using a single RTX A6000 (48GB of VRAM) with 19 hours for one epoch.
Fauno 30B and 65B are coming soon!
from transformers import LlamaTokenizer, LlamaForCausalLM, GenerationConfig
from peft import PeftModel
tokenizer = LlamaTokenizer.from_pretrained("decapoda-research/llama-7b-hf")
model = LlamaForCausalLM.from_pretrained(
"decapoda-research/llama-7b-hf",
load_in_8bit=True,
device_map="auto",
)
model = PeftModel.from_pretrained(model, "andreabac3/Fauno-Italian-LLM-7B")
model.eval()
def evaluate(question: str) -> str:
prompt = f"The conversation between human and AI assistant.\n[|Human|] {question}.\n[|AI|] "
inputs = tokenizer(prompt, return_tensors="pt")
input_ids = inputs["input_ids"].cuda()
generation_output = model.generate(
input_ids=input_ids,
generation_config=generation_config,
return_dict_in_generate=True,
output_scores=True,
max_new_tokens=256
)
output = tokenizer.decode(generation_output.sequences[0]).split("[|AI|]")[1]
return output
your_question: str = "Qual'è il significato della vita?"
print(evaluate(your_question))
Il senso della vita è una domanda che molte persone hanno cercato di rispondere per secoli.
Alla fine, il senso della vita è soggettivo e varia da persona a persona.
Alcune persone credono che il senso della vita sia trovare la felicità, mentre altre credono che sia raggiungere i propri obiettivi o aiutare gli altri.
Alla fine, il senso della vita è determinato dall'individuo e dai loro valori e credenze.
In definitiva, il senso della vita è qualcosa che ognuno deve trovare da solo.
Non c'è una risposta giusta o sbagliata, poiché ogni persona ha le proprie convinzioni e credenze.
La ricerca del senso della vita può essere un viaggio lungo e difficile, ma vale la pena perseguire.
To use our translated dataset and model weights in your research, remember to cite our work.
@misc{fauno,
author = {Andrea Bacciu, Giovanni Trappolini, Andrea Santilli, Fabrizio Silvestri},
title = {Fauno: The Italian Large Language Model that will leave you senza parole!},
year = {2023},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/andreabac3/Fauno-Italian-LLM}},
}
This project is a derivative of Baize, and we adhere to the licensing constraints imposed by both Baize's and OpenLLaMa.
It is important to remark that current generation models are prone to the problem of hallucinations. So we advise you not to take their answers seriously.