Models in CI
Collection
Models used in CI tests across llm-compressor, compressed-tensors, and vllm repositories. โข 44 items โข Updated
How to use inference-optimization/TinyQwen3-KV-Cache-Only with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="inference-optimization/TinyQwen3-KV-Cache-Only")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("inference-optimization/TinyQwen3-KV-Cache-Only")
model = AutoModelForCausalLM.from_pretrained("inference-optimization/TinyQwen3-KV-Cache-Only", device_map="auto")
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=256)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))How to use inference-optimization/TinyQwen3-KV-Cache-Only with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "inference-optimization/TinyQwen3-KV-Cache-Only"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "inference-optimization/TinyQwen3-KV-Cache-Only",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/inference-optimization/TinyQwen3-KV-Cache-Only
How to use inference-optimization/TinyQwen3-KV-Cache-Only with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "inference-optimization/TinyQwen3-KV-Cache-Only" \
--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": "inference-optimization/TinyQwen3-KV-Cache-Only",
"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 "inference-optimization/TinyQwen3-KV-Cache-Only" \
--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": "inference-optimization/TinyQwen3-KV-Cache-Only",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use inference-optimization/TinyQwen3-KV-Cache-Only with Docker Model Runner:
docker model run hf.co/inference-optimization/TinyQwen3-KV-Cache-Only
A tiny Qwen3 model (nm-testing/tinysmokeqwen3) quantized with llm-compressor using only KV cache quantization โ the model weights are left unquantized (dense).
kv_cache_scheme: 8-bit float (fp8), tensor strategy, static, symmetricconfig_groups: {} (no weight quantization)quantization_status: compressedProduced with oneshot and the recipe:
quant_stage:
quant_modifiers:
QuantizationModifier:
kv_cache_scheme:
num_bits: 8
type: float
strategy: tensor
dynamic: False
symmetric: True
Calibrated on 16 samples of open_platypus with max_seq_length=512.
Intended for testing compressed-tensors KV-cache-only checkpoints in transformers CI
(see tests/quantization/compressed_tensors_integration/test_compressed_tensors.py).
from transformers import AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained("inference-optimization/TinyQwen3-KV-Cache-Only")
Base model
nm-testing/tinysmokeqwen3