Instructions to use chengjunyan1/lmsys-analyzer-9b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use chengjunyan1/lmsys-analyzer-9b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="chengjunyan1/lmsys-analyzer-9b") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("chengjunyan1/lmsys-analyzer-9b") model = AutoModelForMultimodalLM.from_pretrained("chengjunyan1/lmsys-analyzer-9b", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use chengjunyan1/lmsys-analyzer-9b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "chengjunyan1/lmsys-analyzer-9b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "chengjunyan1/lmsys-analyzer-9b", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/chengjunyan1/lmsys-analyzer-9b
- SGLang
How to use chengjunyan1/lmsys-analyzer-9b 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 "chengjunyan1/lmsys-analyzer-9b" \ --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": "chengjunyan1/lmsys-analyzer-9b", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "chengjunyan1/lmsys-analyzer-9b" \ --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": "chengjunyan1/lmsys-analyzer-9b", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use chengjunyan1/lmsys-analyzer-9b with Docker Model Runner:
docker model run hf.co/chengjunyan1/lmsys-analyzer-9b
lmsys-analyzer-9b
Qwen3.5-9B trained with reinforcement learning to act as a performance analyst for LLM-serving engines (vLLM / SGLang): given an engine checkout and a workload, it investigates with tools and writes an analysis that a separate implementer model turns into a patch. The reward was the measured, paired speedup of that patch (log speedup, clipped at 2.0; no delivery = 0).
Usage
import torch
from transformers import AutoModelForImageTextToText, AutoTokenizer
repo = "chengjunyan1/lmsys-analyzer-9b"
tokenizer = AutoTokenizer.from_pretrained(repo)
model = AutoModelForImageTextToText.from_pretrained(repo, dtype=torch.bfloat16, device_map="auto") # device_map needs `accelerate`
messages = [{"role": "user", "content": "Why can prefix caching cut time-to-first-token?"}]
inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, tokenize=True,
return_dict=True, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=512)
print(tokenizer.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
For image or video inputs use AutoProcessor.from_pretrained(repo) instead of the tokenizer (as for the base
Qwen3.5 model, its video processor needs torchvision). The model was trained on text-only agent sessions.
vLLM:
vllm serve chengjunyan1/lmsys-analyzer-9b --dtype bfloat16
Training
- Base: Qwen/Qwen3.5-9B, all parameters trained.
- Asynchronous GRPO: 8 prompt groups x 24 rollouts per step (at least 8 valid groups), failure-clipped advantages, an over-length penalty, loss masks on tool-call header and closing-tag names, and a guard that trains down empty tool calls. Learning rate 5e-7 at these steps.
- Rewards come from measuring the delivered patches on GPUs; confirmed reward hacks were audited hourly.
License
Apache-2.0, as the base model.
- Downloads last month
- 15