Downloads · 30 days
23
4% of all-time downloads
cosimoiaia/Loquace-Wizard-13B
Loquace-Wizard-13B is a text generation model from cosimoiaia. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
Downloads · 30 days
23
4% of all-time downloads
All-time downloads
655
Public
Parameters
13B
26 GB on disk
Likes
7
Public
Click a slice to open those files.
.safetensors26 GB · 100%
From the Hugging Face model README
Model Card for Loquace-Wizard-13B
Loquace is an Italian speaking, instruction finetuned, Large Language model. 🇮🇹
Loquace-Wizard-14B's peculiar features:
The Loquace Italian LLM models are created with the goal of democratizing AI and LLM in the Italian Landscape.
<b>No more need for expensive GPU, large funding, Big Corporation or Ivory Tower Institution, just download the code and train on your dataset on your own PC (or a cheap and reliable cloud provider like Genesis Cloud )</b>
The related code can be found at: https://github.com/cosimoiaia/Loquace
from transformers import LlamaForCausalLM, AutoTokenizer
def generate_prompt(instruction):
prompt = f"""### Instruction: {instruction}
### Response:
"""
return prompt
model_name = "."
model = LlamaForCausalLM.from_pretrained(
model_name,
device_map="auto",
torch_dtype=torch.bfloat16
)
model.config.use_cache = True
tokenizer = AutoTokenizer.from_pretrained(model_name, add_eos_token=False)
prompt = generate_prompt("Chi era Dante Alighieri?")
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, do_sample = True, num_beams = 2, top_k=50, top_p= 0.95, max_new_tokens=2046, early_stopping = True)
print(tokenizer.decode(outputs[0], skip_special_tokens=True).split("Response:")[1].strip())
Cosimo Iaia [email protected]