Instructions to use fbaldassarri/modello-italia-9B-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use fbaldassarri/modello-italia-9B-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="fbaldassarri/modello-italia-9B-GGUF") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("fbaldassarri/modello-italia-9B-GGUF") model = AutoModelForCausalLM.from_pretrained("fbaldassarri/modello-italia-9B-GGUF") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - llama-cpp-python
How to use fbaldassarri/modello-italia-9B-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="fbaldassarri/modello-italia-9B-GGUF", filename="modello-italia-9b-ggml-Q2_K.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use fbaldassarri/modello-italia-9B-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf fbaldassarri/modello-italia-9B-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf fbaldassarri/modello-italia-9B-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf fbaldassarri/modello-italia-9B-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf fbaldassarri/modello-italia-9B-GGUF:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf fbaldassarri/modello-italia-9B-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf fbaldassarri/modello-italia-9B-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf fbaldassarri/modello-italia-9B-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf fbaldassarri/modello-italia-9B-GGUF:Q4_K_M
Use Docker
docker model run hf.co/fbaldassarri/modello-italia-9B-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use fbaldassarri/modello-italia-9B-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "fbaldassarri/modello-italia-9B-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "fbaldassarri/modello-italia-9B-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/fbaldassarri/modello-italia-9B-GGUF:Q4_K_M
- SGLang
How to use fbaldassarri/modello-italia-9B-GGUF with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "fbaldassarri/modello-italia-9B-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "fbaldassarri/modello-italia-9B-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "fbaldassarri/modello-italia-9B-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "fbaldassarri/modello-italia-9B-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use fbaldassarri/modello-italia-9B-GGUF with Ollama:
ollama run hf.co/fbaldassarri/modello-italia-9B-GGUF:Q4_K_M
- Unsloth Studio new
How to use fbaldassarri/modello-italia-9B-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for fbaldassarri/modello-italia-9B-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for fbaldassarri/modello-italia-9B-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for fbaldassarri/modello-italia-9B-GGUF to start chatting
- Docker Model Runner
How to use fbaldassarri/modello-italia-9B-GGUF with Docker Model Runner:
docker model run hf.co/fbaldassarri/modello-italia-9B-GGUF:Q4_K_M
- Lemonade
How to use fbaldassarri/modello-italia-9B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull fbaldassarri/modello-italia-9B-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.modello-italia-9B-GGUF-Q4_K_M
List all available models
lemonade list
Model Card for Modello Italia 9B GGUFs
This an UNOFFICIAL GGUF format model files repository for converted/quantized OFFICIAL model checkpoint of "Modello Italia 9B", Large Language Model (LLM) developed by iGenius in collaboration with CINECA.
- More information about Modello Italia: click here.
🚨 Disclaimers
- This is an UNOFFICIAL quantization of the OFFICIAL model checkpoint released by iGenius.
- This model is based also on the conversion made for HF Transformers by Sapienza NLP, Sapienza University of Rome.
- The original model was developed using LitGPT.
🚨 Terms and Conditions
- Note: By using this model, you accept the iGenius' terms and conditions.
🚨 About GGUF
GGUF is a new format introduced by the llama.cpp team on August 21st 2023. It is a replacement for GGML, which is no longer supported by llama.cpp. GGUF offers numerous advantages over GGML, such as better tokenisation, and support for special tokens. It is also supports metadata, and is designed to be extensible.
Here is an incomplate list of clients and libraries that are known to support GGUF:
- llama.cpp. The source project for GGUF. Offers a CLI and a server option.
- neural-speed. Same interface of llama.cpp, optimized for interefence on CPU.
- text-generation-webui, the most widely used web UI, with many features and powerful extensions. Supports GPU acceleration.
- KoboldCpp, a fully featured web UI, with GPU accel across all platforms and GPU architectures. Especially good for story telling.
- LM Studio, an easy-to-use and powerful local GUI for Windows and macOS (Silicon), with GPU acceleration.
- LoLLMS Web UI, a great web UI with many interesting and unique features, including a full model library for easy model selection.
- Faraday.dev, an attractive and easy to use character-based chat GUI for Windows and macOS (both Silicon and Intel), with GPU acceleration.
- ctransformers, a Python library with GPU accel, LangChain support, and OpenAI-compatible AI server.
- llama-cpp-python, a Python library with GPU accel, LangChain support, and OpenAI-compatible API server.
- candle, a Rust ML framework with a focus on performance, including GPU support, and ease of use.
🚨 Explanation of quantisation methods
The new methods available are:
- GGML_TYPE_Q2_K - "type-1" 2-bit quantization in super-blocks containing 16 blocks, each block having 16 weight. Block scales and mins are quantized with 4 bits. This ends up effectively using 2.5625 bits per weight (bpw)
- GGML_TYPE_Q3_K - "type-0" 3-bit quantization in super-blocks containing 16 blocks, each block having 16 weights. Scales are quantized with 6 bits. This end up using 3.4375 bpw.
- GGML_TYPE_Q4_K - "type-1" 4-bit quantization in super-blocks containing 8 blocks, each block having 32 weights. Scales and mins are quantized with 6 bits. This ends up using 4.5 bpw.
- GGML_TYPE_Q5_K - "type-1" 5-bit quantization. Same super-block structure as GGML_TYPE_Q4_K resulting in 5.5 bpw
- GGML_TYPE_Q6_K - "type-0" 6-bit quantization. Super-blocks with 16 blocks, each block having 16 weights. Scales are quantized with 8 bits. This ends up using 6.5625 bpw
Refer to the Provided Files table below to see what files use which methods, and how.
🚨 Provided files
| Name | Quant method | Bits | Size | Use case |
|---|---|---|---|---|
| modello-italia-9b-ggml-Q2_K.gguf | Q2_K | 2 | 3.3 GB | smallest, significant quality loss - not recommended for most purposes |
| modello-italia-9b-ggml-Q3_K_M.gguf | Q3_K_M | 3 | 4.6 GB | very small, high quality loss |
| modello-italia-9b-ggml-Q3_K_L.gguf | Q3_K_L | 3 | 4.9 GB | small, substantial quality loss |
| modello-italia-9b-ggml-Q4_0.gguf | Q4_0 | 4 | 4.9 GB | legacy; small, very high quality loss - prefer using Q3_K_M |
| modello-italia-9b-ggml-Q4_K_S.gguf | Q4_K_S | 4 | 4.9 GB | small, greater quality loss |
| modello-italia-9b-ggml-Q4_K_M.gguf | Q4_K_M | 4 | 5.5 GB | medium, balanced quality - RECOMMENDED |
| modello-italia-9b-ggml-Q5_0.gguf | Q5_0 | 5 | 5.9 GB | legacy; medium, balanced quality - prefer using Q4_K_M |
| modello-italia-9b-ggml-Q5_K_S.gguf | Q5_K_S | 5 | 5.9 GB | large, low quality loss - recommended |
| modello-italia-9b-ggml-Q5_K_M.gguf | Q5_K_M | 5 | 6.4 GB | large, very low quality loss - recommended |
| modello-italia-9b-ggml-Q6_K.gguf | Q6_K | 6 | 7.0 GB | very large, extremely low quality loss |
| modello-italia-9b-ggml-Q8_0.gguf | Q8_0 | 8 | 9.1 GB | very large, extremely low quality loss - not recommended |
| modello-italia-9b-ggml-f16.gguf | FP16 | 16 | 17.1 GB | very large, extremely low quality loss - not recommended |
| modello-italia-9b-ggml-f32.gguf | FP32 | 32 | 34.2 GB | very large, no quality loss - not recommended |
🚨 Compatibility
These quantised GGUFv2 files are compatible with llama.cpp from August 27th 2023 onwards, as of commit d0cee0d36d5be95a0d9088b674dbb27354107221
They are also compatible with many third party UIs and libraries - please see the list at the top of this README.
🚨 Reproducibility
This model has been converted/quantized using Intel neural-speed.
🚨 Biases and Risks
From the terms and conditions of iGenius for Modello Italia:
Modello Italia è concepito per essere utilizzato da tutti e per adattarsi a una vasta gamma di casi d'uso. È stato progettato con l'obiettivo di essere accessibile a persone provenienti da background, esperienze e prospettive diverse. Modello Italia si rivolge agli utenti e alle loro esigenze senza inserire giudizi superflui o normative, riconoscendo al contempo che anche contenuti potenzialmente problematici in determinati contesti possono avere scopi validi in altri. Il rispetto per la dignità e l'autonomia di tutti gli utenti, specialmente in termini di libertà di pensiero ed espressione, è un pilastro fondamentale del suo design. Tuttavia, essendo una nuova tecnologia, Modello Italia comporta rischi legati al suo utilizzo. I test condotti finora sono stati eseguiti in italiano e non hanno potuto coprire tutte le possibili situazioni. Pertanto, come per tutti gli LLM, non è possibile prevedere in anticipo gli output di Modello Italia e il modello potrebbe in alcuni casi generare risposte imprecise, tendenziose o altre risposte discutibili. Prima di utilizzare Modello Italia in qualsiasi contesto, gli sviluppatori sono fortemente incoraggiati a eseguire test di sicurezza e adattamento specifici per le loro applicazioni.
We are aware of the biases and potential problematic/toxic content that current pretrained large language models exhibit: more specifically, as probabilistic models of (Italian and English) languages, they reflect and amplify the biases of their training data.
For more information about this issue, please refer to our survey paper:
🚨 Model architecture
- The model architecture is based on GPT-NeoX.
- Downloads last month
- 1,002
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit
16-bit
32-bit
Model tree for fbaldassarri/modello-italia-9B-GGUF
Base model
sapienzanlp/modello-italia-9b