HuggingFaceH4/ultrachat_200k
Viewer • Updated • 515k • 68.4k • 705
How to use pbatra/TinyLlama-1.1B-Chat-v1.0-GGUF with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="pbatra/TinyLlama-1.1B-Chat-v1.0-GGUF")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("pbatra/TinyLlama-1.1B-Chat-v1.0-GGUF", dtype="auto")How to use pbatra/TinyLlama-1.1B-Chat-v1.0-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="pbatra/TinyLlama-1.1B-Chat-v1.0-GGUF", filename="tinyllama-1.1b-chat-v1.0.Q2_K.gguf", )
llm.create_chat_completion(
messages = [
{
"role": "user",
"content": "What is the capital of France?"
}
]
)How to use pbatra/TinyLlama-1.1B-Chat-v1.0-GGUF with llama.cpp:
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf pbatra/TinyLlama-1.1B-Chat-v1.0-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf pbatra/TinyLlama-1.1B-Chat-v1.0-GGUF:Q4_K_M
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf pbatra/TinyLlama-1.1B-Chat-v1.0-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf pbatra/TinyLlama-1.1B-Chat-v1.0-GGUF:Q4_K_M
# 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 pbatra/TinyLlama-1.1B-Chat-v1.0-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf pbatra/TinyLlama-1.1B-Chat-v1.0-GGUF:Q4_K_M
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 pbatra/TinyLlama-1.1B-Chat-v1.0-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf pbatra/TinyLlama-1.1B-Chat-v1.0-GGUF:Q4_K_M
docker model run hf.co/pbatra/TinyLlama-1.1B-Chat-v1.0-GGUF:Q4_K_M
How to use pbatra/TinyLlama-1.1B-Chat-v1.0-GGUF with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "pbatra/TinyLlama-1.1B-Chat-v1.0-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": "pbatra/TinyLlama-1.1B-Chat-v1.0-GGUF",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/pbatra/TinyLlama-1.1B-Chat-v1.0-GGUF:Q4_K_M
How to use pbatra/TinyLlama-1.1B-Chat-v1.0-GGUF with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "pbatra/TinyLlama-1.1B-Chat-v1.0-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": "pbatra/TinyLlama-1.1B-Chat-v1.0-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 "pbatra/TinyLlama-1.1B-Chat-v1.0-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": "pbatra/TinyLlama-1.1B-Chat-v1.0-GGUF",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use pbatra/TinyLlama-1.1B-Chat-v1.0-GGUF with Ollama:
ollama run hf.co/pbatra/TinyLlama-1.1B-Chat-v1.0-GGUF:Q4_K_M
How to use pbatra/TinyLlama-1.1B-Chat-v1.0-GGUF with Unsloth Studio:
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 pbatra/TinyLlama-1.1B-Chat-v1.0-GGUF to start chatting
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 pbatra/TinyLlama-1.1B-Chat-v1.0-GGUF to start chatting
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for pbatra/TinyLlama-1.1B-Chat-v1.0-GGUF to start chatting
How to use pbatra/TinyLlama-1.1B-Chat-v1.0-GGUF with Docker Model Runner:
docker model run hf.co/pbatra/TinyLlama-1.1B-Chat-v1.0-GGUF:Q4_K_M
How to use pbatra/TinyLlama-1.1B-Chat-v1.0-GGUF with Lemonade:
# Download Lemonade from https://lemonade-server.ai/ lemonade pull pbatra/TinyLlama-1.1B-Chat-v1.0-GGUF:Q4_K_M
lemonade run user.TinyLlama-1.1B-Chat-v1.0-GGUF-Q4_K_M
lemonade list
This repository contains quantized versions of the model from the original repository: TinyLlama/TinyLlama-1.1B-Chat-v1.0.
| Name | Quantization Method | Size (GB) |
|---|---|---|
| tinyllama-1.1b-chat-v1.0.fp16.gguf | FP16 | 2.05 |
| tinyllama-1.1b-chat-v1.0.fp32.gguf | FP32 | 4.10 |
| tinyllama-1.1b-chat-v1.0.Q2_K.gguf | q2_k | 0.40 |
| tinyllama-1.1b-chat-v1.0.Q3_K_S.gguf | q3_k_s | 0.47 |
| tinyllama-1.1b-chat-v1.0.Q3_K_M.gguf | q3_k_m | 0.51 |
| tinyllama-1.1b-chat-v1.0.Q3_K_L.gguf | q3_k_l | 0.55 |
| tinyllama-1.1b-chat-v1.0.Q4_0.gguf | q4_0 | 0.59 |
| tinyllama-1.1b-chat-v1.0.Q4_K_S.gguf | q4_k_s | 0.60 |
| tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf | q4_k_m | 0.62 |
| tinyllama-1.1b-chat-v1.0.Q5_0.gguf | q5_0 | 0.71 |
| tinyllama-1.1b-chat-v1.0.Q5_K_S.gguf | q5_k_s | 0.71 |
| tinyllama-1.1b-chat-v1.0.Q5_K_M.gguf | q5_k_m | 0.73 |
| tinyllama-1.1b-chat-v1.0.Q6_K.gguf | q6_k | 0.84 |
| tinyllama-1.1b-chat-v1.0.Q8_0.gguf | q8_0 | 1.09 |
Base model
TinyLlama/TinyLlama-1.1B-Chat-v1.0