Metis
Collection
Metis persistent-memory model family based on Qwen3.5, including 4B, 9B, and 27B parameter scales. • 3 items • Updated • 1
How to use IAAR-Shanghai/Metis-9B with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="IAAR-Shanghai/Metis-9B", trust_remote_code=True)
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained("IAAR-Shanghai/Metis-9B", trust_remote_code=True, device_map="auto")How to use IAAR-Shanghai/Metis-9B with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "IAAR-Shanghai/Metis-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": "IAAR-Shanghai/Metis-9B",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/IAAR-Shanghai/Metis-9B
How to use IAAR-Shanghai/Metis-9B with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "IAAR-Shanghai/Metis-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": "IAAR-Shanghai/Metis-9B",
"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 "IAAR-Shanghai/Metis-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": "IAAR-Shanghai/Metis-9B",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use IAAR-Shanghai/Metis-9B with Docker Model Runner:
docker model run hf.co/IAAR-Shanghai/Metis-9B
Metis-9B is a Metis persistent-memory model built on Qwen/Qwen3.5-9B.
The repository contains the complete merged model weights rather than a delta-only checkpoint.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "IAAR-Shanghai/Metis-9B"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_id,
trust_remote_code=True,
dtype=torch.bfloat16,
device_map="auto",
)
Metis uses custom Transformers code included in this repository. Use Transformers 5.4.0 or newer.