Quantizations
Collection
All GGUF quants that I have made so far, and demos too. โข 6 items โข Updated
How to use Fu01978/Qwen2-0.5B-Instruct-Q2_K-GGUF with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="Fu01978/Qwen2-0.5B-Instruct-Q2_K-GGUF") # pip install -U transformers accelerate
# Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("Fu01978/Qwen2-0.5B-Instruct-Q2_K-GGUF", device_map="auto")How to use Fu01978/Qwen2-0.5B-Instruct-Q2_K-GGUF with llama.cpp:
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf Fu01978/Qwen2-0.5B-Instruct-Q2_K-GGUF:Q2_K # Run inference directly in the terminal: llama cli -hf Fu01978/Qwen2-0.5B-Instruct-Q2_K-GGUF:Q2_K
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Fu01978/Qwen2-0.5B-Instruct-Q2_K-GGUF:Q2_K # Run inference directly in the terminal: llama cli -hf Fu01978/Qwen2-0.5B-Instruct-Q2_K-GGUF:Q2_K
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf Fu01978/Qwen2-0.5B-Instruct-Q2_K-GGUF:Q2_K # Run inference directly in the terminal: ./build/bin/llama cli -hf Fu01978/Qwen2-0.5B-Instruct-Q2_K-GGUF:Q2_K
docker model run hf.co/Fu01978/Qwen2-0.5B-Instruct-Q2_K-GGUF:Q2_K
How to use Fu01978/Qwen2-0.5B-Instruct-Q2_K-GGUF with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "Fu01978/Qwen2-0.5B-Instruct-Q2_K-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": "Fu01978/Qwen2-0.5B-Instruct-Q2_K-GGUF",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/Fu01978/Qwen2-0.5B-Instruct-Q2_K-GGUF:Q2_K
How to use Fu01978/Qwen2-0.5B-Instruct-Q2_K-GGUF with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "Fu01978/Qwen2-0.5B-Instruct-Q2_K-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": "Fu01978/Qwen2-0.5B-Instruct-Q2_K-GGUF",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'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 "Fu01978/Qwen2-0.5B-Instruct-Q2_K-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": "Fu01978/Qwen2-0.5B-Instruct-Q2_K-GGUF",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use Fu01978/Qwen2-0.5B-Instruct-Q2_K-GGUF with Ollama:
ollama run hf.co/Fu01978/Qwen2-0.5B-Instruct-Q2_K-GGUF:Q2_K
How to use Fu01978/Qwen2-0.5B-Instruct-Q2_K-GGUF with Docker Model Runner:
docker model run hf.co/Fu01978/Qwen2-0.5B-Instruct-Q2_K-GGUF:Q2_K
How to use Fu01978/Qwen2-0.5B-Instruct-Q2_K-GGUF with Lemonade:
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Fu01978/Qwen2-0.5B-Instruct-Q2_K-GGUF:Q2_K
lemonade run user.Qwen2-0.5B-Instruct-Q2_K-GGUF-Q2_K
lemonade list
This model was converted to GGUF format from unsloth/Qwen2-0.5B-Instruct using llama.cpp via the ggml.ai's GGUF-my-repo space.
Refer to the original model card for more details on the model.
llama-cli --hf-repo Fu01978/Qwen2-0.5B-Instruct-Q2_K-GGUF --hf-file qwen2-0.5b-instruct-q2_k.gguf -p "The meaning to life and the universe is"
llama-server --hf-repo Fu01978/Qwen2-0.5B-Instruct-Q2_K-GGUF --hf-file qwen2-0.5b-instruct-q2_k.gguf -c 2048
2-bit
Base model
unsloth/Qwen2-0.5B-Instruct