Downloads · 30 days
20
0% of all-time downloads
m-polignano/ANITA-NEXT-20B-gpt-oss-ITA
ANITA-NEXT-20B-gpt-oss-ITA is a text generation model from m-polignano. 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.
<img src="https://huggingface.co/m-polignano/ANITA-NEXT-24B-Magistral-2506-ITA/resolve/main/Anita-Nextfull.png" alt="anitanext" border="0" width="600px" <hr <h3<i"Built on <bopenai/gpt-oss-20b</b"</i</i</h3 <p style="…
Downloads · 30 days
20
0% of all-time downloads
All-time downloads
14.4K
Public
Parameters
20.9B
41.9 GB on disk
Likes
5
Public
Click a slice to open those files.
.safetensors41.8 GB · 100%
From the Hugging Face model README
❗❗❗Use at your own risk. The model may generate hallucinations, incorrect, invented, offensive, unethical or dangerous responses. We are not responsible for any dangerous/offensive/criminal use. The model is release for research only purposes.❗❗❗
The 🌟ANITA project🌟 (Advanced Natural-based interaction for the ITAlian language) wants to provide Italian NLP researchers with an improved model for the Italian Language 🇮🇹 use cases.
The NEXT family includes four models:
GGUF - OLLAMA: m-polignano/ANITA-NEXT-20B-gpt-oss-ITA-GGUF
<hr>Colab Demo: A100 - 40GB - Colab Notebook<br> The Model runs on a single GPU, 39.72GB of VRAM by using a 4bit Quantization.
<hr>To use the model directly, there are many ways to get started, choose one of the following ways to experience it.
L'utente ti chiederà di risolvere un compito o rispondere ad una domanda. Rispondi e ragiona usando la lingua della domanda, preferendo l'Italiano.
Scrivi il tuo flusso di pensiero (monologo interiore) nel canale di 'analysis'. Ragiona in modo disinvolto, scrivendo riflessioni e/o bozze, come se stessi lavorando a un esercizio su un foglio di carta.
Successivamente, scrivi la soluzione in modo chiaro, corretto, semplice ed esaustivo basandoti sul riassunto del tuo flusso di pensiero.
Se necessario, usa la notazione markdown per formattare la risposta.
For direct use with transformers, you can easily get started with the following steps.
Firstly, you need to install transformers via the command below with pip.
pip install -U --no-deps bitsandbytes accelerate xformers transformers peft trl cut_cross_entropy unsloth_zoo
pip install sentencepiece protobuf "datasets>=3.4.1,<4.0.0" "huggingface_hub>=0.34.0" hf_transfer
Right now, you can start using the model directly.
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
from transformers import BitsAndBytesConfig
nf4_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_use_double_quant=True,
bnb_4bit_compute_dtype=torch.bfloat16
)
model_dir = "m-polignano/ANITA-NEXT-20B-openai-gpt-oss-ITA"
tokenizer = AutoTokenizer.from_pretrained(model_dir, use_fast=True)
model = AutoModelForCausalLM.from_pretrained(
model_dir,
quantization_config=nf4_config,
device_map="auto",
torch_dtype=torch.bfloat16,
)
#Method 1
sys = '''L'utente ti chiederà di risolvere un compito o rispondere ad una domanda. Rispondi e ragiona usando la lingua della domanda, preferendo l'Italiano.
Scrivi il tuo flusso di pensiero (monologo interiore) nel canale di 'analysis'. Ragiona in modo disinvolto, scrivendo riflessioni e/o bozze, come se stessi lavorando a un esercizio su un foglio di carta.
Successivamente, scrivi la soluzione in modo chiaro, corretto, semplice ed esaustivo basandoti sul riassunto del tuo flusso di pensiero.
Se necessario, usa la notazione markdown per formattare la risposta.'''
messages = [
{"role" : "system", "content" : sys},
{"role" : "user", "content" : "Chi è Carlo Magno?"}
]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt", add_special_tokens=False)
for k,v in inputs.items():
inputs[k] = v.cuda()
outputs = model.generate(**inputs, max_new_tokens=32786, do_sample=True, top_p=0.9, temperature=0.7)
results = tokenizer.batch_decode(outputs)[0]
print(results)
@misc{polignano2024advanced,
title={Advanced Natural-based interaction for the ITAlian language: LLaMAntino-3-ANITA},
author={Marco Polignano and Pierpaolo Basile and Giovanni Semeraro},
year={2024},
eprint={2405.07101},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
@misc{openai2025gptoss,
author = {{OpenAI}},
title = {Introducing gpt‑oss},
howpublished = {\url{https://openai.com/en-EN/index/introducing-gpt-oss/}},
year = {2025},
month = aug,
day = {5},
note = {Accessed: 16 August 2025},
}