Instructions to use MoxoffSrL/VolareQuantized with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MoxoffSrL/VolareQuantized with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="MoxoffSrL/VolareQuantized")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("MoxoffSrL/VolareQuantized") model = AutoModelForCausalLM.from_pretrained("MoxoffSrL/VolareQuantized") - llama-cpp-python
How to use MoxoffSrL/VolareQuantized with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="MoxoffSrL/VolareQuantized", filename="Volare-ggml-Q4_K_M.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use MoxoffSrL/VolareQuantized with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf MoxoffSrL/VolareQuantized:Q4_K_M # Run inference directly in the terminal: llama-cli -hf MoxoffSrL/VolareQuantized:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf MoxoffSrL/VolareQuantized:Q4_K_M # Run inference directly in the terminal: llama-cli -hf MoxoffSrL/VolareQuantized: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 MoxoffSrL/VolareQuantized:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf MoxoffSrL/VolareQuantized: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 MoxoffSrL/VolareQuantized:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf MoxoffSrL/VolareQuantized:Q4_K_M
Use Docker
docker model run hf.co/MoxoffSrL/VolareQuantized:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use MoxoffSrL/VolareQuantized with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MoxoffSrL/VolareQuantized" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MoxoffSrL/VolareQuantized", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/MoxoffSrL/VolareQuantized:Q4_K_M
- SGLang
How to use MoxoffSrL/VolareQuantized 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 "MoxoffSrL/VolareQuantized" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MoxoffSrL/VolareQuantized", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "MoxoffSrL/VolareQuantized" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MoxoffSrL/VolareQuantized", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use MoxoffSrL/VolareQuantized with Ollama:
ollama run hf.co/MoxoffSrL/VolareQuantized:Q4_K_M
- Unsloth Studio new
How to use MoxoffSrL/VolareQuantized 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 MoxoffSrL/VolareQuantized 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 MoxoffSrL/VolareQuantized to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for MoxoffSrL/VolareQuantized to start chatting
- Docker Model Runner
How to use MoxoffSrL/VolareQuantized with Docker Model Runner:
docker model run hf.co/MoxoffSrL/VolareQuantized:Q4_K_M
- Lemonade
How to use MoxoffSrL/VolareQuantized with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull MoxoffSrL/VolareQuantized:Q4_K_M
Run and chat with the model
lemonade run user.VolareQuantized-Q4_K_M
List all available models
lemonade list
output = llm(
"Once upon a time,",
max_tokens=512,
echo=True
)
print(output)Model Information
VolareQuantized is a compact iteration of the model Volare, optimized for efficiency.
It is offered in two distinct configurations: a 4-bit version and an 8-bit version, each designed to maintain the model's effectiveness while significantly reducing its size and computational requirements.
- It's trained both on publicly available datasets, like SQUAD-it, and datasets we've created in-house.
- it's designed to understand and maintain context, making it ideal for Retrieval Augmented Generation (RAG) tasks and applications requiring contextual awareness.
- It is quantized in a 4-bit version and an 8-bit version following the procedure here.
Evaluation
We evaluated the model using the same test sets as used for the Open Ita LLM Leaderboard
| hellaswag_it acc_norm | arc_it acc_norm | m_mmlu_it 5-shot acc | Average | F1 |
|---|---|---|---|---|
| 0.6474 | 0.4671 | 0.5521 | 0.555 | 69.82 |
Usage
You need to download the .gguf model first
If you want to use the cpu install these dependencies:
pip install llama-cpp-python huggingface_hub
If you want to use the gpu instead:
CMAKE_ARGS="-DLLAMA_CUBLAS=on" pip install huggingface_hub llama-cpp-python --force-reinstall --upgrade --no-cache-dir
And then use this code to see a response to the prompt.
from huggingface_hub import hf_hub_download
from llama_cpp import Llama
model_path = hf_hub_download(
repo_id="MoxoffSpA/VolareQuantized",
filename="Volare-ggml-Q4_K_M.gguf"
)
# Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system.
llm = Llama(
model_path=model_path,
n_ctx=2048, # The max sequence length to use - note that longer sequence lengths require much more resources
n_threads=8, # The number of CPU threads to use, tailor to your system and the resulting performance
n_gpu_layers=0 # The number of layers to offload to GPU, if you have GPU acceleration available
)
# Simple inference example
question = """Quanto è alta la torre di Pisa?"""
context = """
La Torre di Pisa è un campanile del XII secolo, famoso per la sua inclinazione. Alta circa 56 metri.
"""
prompt = f"Domanda: {question}, contesto: {context}"
output = llm(
f"[INST] {prompt} [/INST]", # Prompt
max_tokens=128,
stop=["\n"],
echo=True,
temperature=0.1,
top_p=0.95
)
# Chat Completion API
print(output['choices'][0]['text'])
Bias, Risks and Limitations
VolareQuantized and its original model have not been aligned to human preferences for safety within the RLHF phase or deployed with in-the-loop filtering of responses like ChatGPT, so the model can produce problematic outputs (especially when prompted to do so). It is also unknown what the size and composition of the corpus was used to train the base model, however, it is likely to have included a mix of Web data and technical sources like books and code.
Links to resources
- SQUAD-it dataset: https://huggingface.co/datasets/squad_it
- Gemma-7b model: https://huggingface.co/google/gemma-7b
- Open Ita LLM Leaderbord: https://huggingface.co/spaces/FinancialSupport/open_ita_llm_leaderboard
Quantized versions
We have the not quantized version here: https://huggingface.co/MoxoffSpA/Volare
The Moxoff Team
Jacopo Abate, Marco D'Ambra, Luigi Simeone, Gianpaolo Francesco Trotta
- Downloads last month
- 74
4-bit
8-bit
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="MoxoffSrL/VolareQuantized", filename="", )