xlangai/spider
Viewer • Updated • 8.03k • 9.39k • 174
How to use astom-M/matsuo-llm-advanced-phase-a with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="astom-M/matsuo-llm-advanced-phase-a")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("astom-M/matsuo-llm-advanced-phase-a")
model = AutoModelForCausalLM.from_pretrained("astom-M/matsuo-llm-advanced-phase-a")
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=40)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))How to use astom-M/matsuo-llm-advanced-phase-a with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "astom-M/matsuo-llm-advanced-phase-a"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "astom-M/matsuo-llm-advanced-phase-a",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/astom-M/matsuo-llm-advanced-phase-a
How to use astom-M/matsuo-llm-advanced-phase-a with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "astom-M/matsuo-llm-advanced-phase-a" \
--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": "astom-M/matsuo-llm-advanced-phase-a",
"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 "astom-M/matsuo-llm-advanced-phase-a" \
--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": "astom-M/matsuo-llm-advanced-phase-a",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use astom-M/matsuo-llm-advanced-phase-a with Docker Model Runner:
docker model run hf.co/astom-M/matsuo-llm-advanced-phase-a
This model is a fine-tuned version of Qwen/Qwen2.5-7B-Instruct optimized for multi-benchmark agent tasks (ALFWorld + DBBench).
Key characteristics:
| Parameter | Value |
|---|---|
| LoRA rank (r) | 16 |
| LoRA alpha | 32 |
| LoRA dropout | 0 |
| Target modules | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj |
| Trainable params | ~0.28% of total |
| Parameter | Value |
|---|---|
| Learning rate | 3e-5 |
| Epochs | 1.0 |
| Batch size (effective) | 16 (4 × 4 grad accum) |
| Max sequence length | 4096 |
| LR scheduler | linear |
| Optimizer | AdamW 8-bit |
| Warmup ratio | 0.03 |
| Weight decay | 0.01 |
| Precision | bfloat16 |
u-10bei/dbbench_sft_dataset_react_v4u-10bei/sft_alfworld_trajectory_dataset_v5| Benchmark | Score |
|---|---|
| DBBench (expected) | 55%+ |
| ALFWorld (expected) | 65%+ |
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model = AutoModelForCausalLM.from_pretrained(
"astom-M/matsuo-llm-advanced-phase-a",
torch_dtype=torch.bfloat16,
device_map="auto",
trust_remote_code=True
)
tokenizer = AutoTokenizer.from_pretrained(
"astom-M/matsuo-llm-advanced-phase-a",
trust_remote_code=True
)
python -m vllm.entrypoints.openai.api_server \
--model astom-M/matsuo-llm-advanced-phase-a \
--dtype bfloat16 \
--max-model-len 4096
config.json does NOT contain quantization_config — clean bf16 modeltorch.bfloat16 dtypeThis model was trained as Phase A of a multi-phase optimization strategy:
The training data composition was carefully balanced to:
Apache 2.0 (inherited from Qwen2.5-7B-Instruct)
Model Card Metadata: