Instructions to use QuantFactory/calme-2.1-phi3.5-4b-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use QuantFactory/calme-2.1-phi3.5-4b-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="QuantFactory/calme-2.1-phi3.5-4b-GGUF") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("QuantFactory/calme-2.1-phi3.5-4b-GGUF", dtype="auto") - llama-cpp-python
How to use QuantFactory/calme-2.1-phi3.5-4b-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="QuantFactory/calme-2.1-phi3.5-4b-GGUF", filename="calme-2.1-phi3.5-4b.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 QuantFactory/calme-2.1-phi3.5-4b-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf QuantFactory/calme-2.1-phi3.5-4b-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf QuantFactory/calme-2.1-phi3.5-4b-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 QuantFactory/calme-2.1-phi3.5-4b-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf QuantFactory/calme-2.1-phi3.5-4b-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 QuantFactory/calme-2.1-phi3.5-4b-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf QuantFactory/calme-2.1-phi3.5-4b-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 QuantFactory/calme-2.1-phi3.5-4b-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf QuantFactory/calme-2.1-phi3.5-4b-GGUF:Q4_K_M
Use Docker
docker model run hf.co/QuantFactory/calme-2.1-phi3.5-4b-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use QuantFactory/calme-2.1-phi3.5-4b-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "QuantFactory/calme-2.1-phi3.5-4b-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": "QuantFactory/calme-2.1-phi3.5-4b-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/QuantFactory/calme-2.1-phi3.5-4b-GGUF:Q4_K_M
- SGLang
How to use QuantFactory/calme-2.1-phi3.5-4b-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 "QuantFactory/calme-2.1-phi3.5-4b-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": "QuantFactory/calme-2.1-phi3.5-4b-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 "QuantFactory/calme-2.1-phi3.5-4b-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": "QuantFactory/calme-2.1-phi3.5-4b-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use QuantFactory/calme-2.1-phi3.5-4b-GGUF with Ollama:
ollama run hf.co/QuantFactory/calme-2.1-phi3.5-4b-GGUF:Q4_K_M
- Unsloth Studio new
How to use QuantFactory/calme-2.1-phi3.5-4b-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 QuantFactory/calme-2.1-phi3.5-4b-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 QuantFactory/calme-2.1-phi3.5-4b-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for QuantFactory/calme-2.1-phi3.5-4b-GGUF to start chatting
- Docker Model Runner
How to use QuantFactory/calme-2.1-phi3.5-4b-GGUF with Docker Model Runner:
docker model run hf.co/QuantFactory/calme-2.1-phi3.5-4b-GGUF:Q4_K_M
- Lemonade
How to use QuantFactory/calme-2.1-phi3.5-4b-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull QuantFactory/calme-2.1-phi3.5-4b-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.calme-2.1-phi3.5-4b-GGUF-Q4_K_M
List all available models
lemonade list
QuantFactory/calme-2.1-phi3.5-4b-GGUF
This is quantized version of MaziyarPanahi/calme-2.1-phi3.5-4b created using llama.cpp
Original Model Card
MaziyarPanahi/calme-2.1-phi3.5-4b
This model is a fine-tuned version of the microsoft/Phi-3.5-mini-instruct, pushing the boundaries of natural language understanding and generation even further. My goal was to create a versatile and robust model that excels across a wide range of benchmarks and real-world applications.
Use Cases
This model is suitable for a wide range of applications, including but not limited to:
- Advanced question-answering systems
- Intelligent chatbots and virtual assistants
- Content generation and summarization
- Code generation and analysis
- Complex problem-solving and decision support
⚡ Quantized GGUF
Here are the quants: calme-2.1-phi3.5-4b-GGUF
🏆 Open LLM Leaderboard Evaluation Results
Coming soon!
Prompt Template
This model uses ChatML prompt template:
<|system|>
You are a helpful assistant.<|end|>
<|user|>
How to explain Internet for a medieval knight?<|end|>
<|assistant|>
How to use
# Use a pipeline as a high-level helper
from transformers import pipeline
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe = pipeline("text-generation", model="MaziyarPanahi/calme-2.1-phi3.5-4b")
pipe(messages)
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("MaziyarPanahi/calme-2.1-phi3.5-4b")
model = AutoModelForCausalLM.from_pretrained("MaziyarPanahi/calme-2.1-phi3.5-4b")
Ethical Considerations
As with any large language model, users should be aware of potential biases and limitations. We recommend implementing appropriate safeguards and human oversight when deploying this model in production environments.
Open LLM Leaderboard Evaluation Results
Detailed results can be found here
| Metric | Value |
|---|---|
| Avg. | 27.01 |
| IFEval (0-Shot) | 56.59 |
| BBH (3-Shot) | 36.11 |
| MATH Lvl 5 (4-Shot) | 14.43 |
| GPQA (0-shot) | 12.53 |
| MuSR (0-shot) | 9.77 |
| MMLU-PRO (5-shot) | 32.61 |
- Downloads last month
- 535
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit
Model tree for QuantFactory/calme-2.1-phi3.5-4b-GGUF
Base model
microsoft/Phi-3.5-mini-instructDataset used to train QuantFactory/calme-2.1-phi3.5-4b-GGUF
Evaluation results
- strict accuracy on IFEval (0-Shot)Open LLM Leaderboard56.590
- normalized accuracy on BBH (3-Shot)Open LLM Leaderboard36.110
- exact match on MATH Lvl 5 (4-Shot)Open LLM Leaderboard14.430
- acc_norm on GPQA (0-shot)Open LLM Leaderboard12.530
- acc_norm on MuSR (0-shot)Open LLM Leaderboard9.770
- accuracy on MMLU-PRO (5-shot)test set Open LLM Leaderboard32.610