Text Generation
Transformers
Safetensors
English
Japanese
Chinese
qwen2
sql
dbbench
lora
sft
conversational
text-generation-inference
Instructions to use astom-M/matsuo-llm-advanced-dbbench-bf16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use astom-M/matsuo-llm-advanced-dbbench-bf16 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="astom-M/matsuo-llm-advanced-dbbench-bf16") 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-dbbench-bf16") model = AutoModelForCausalLM.from_pretrained("astom-M/matsuo-llm-advanced-dbbench-bf16", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use astom-M/matsuo-llm-advanced-dbbench-bf16 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "astom-M/matsuo-llm-advanced-dbbench-bf16" # 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-dbbench-bf16", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/astom-M/matsuo-llm-advanced-dbbench-bf16
- SGLang
How to use astom-M/matsuo-llm-advanced-dbbench-bf16 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 "astom-M/matsuo-llm-advanced-dbbench-bf16" \ --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-dbbench-bf16", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "astom-M/matsuo-llm-advanced-dbbench-bf16" \ --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-dbbench-bf16", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use astom-M/matsuo-llm-advanced-dbbench-bf16 with Docker Model Runner:
docker model run hf.co/astom-M/matsuo-llm-advanced-dbbench-bf16
Qwen2.5-7B-Instruct + DBBench bf16 LoRA
Model Description
This model is a fine-tuned version of Qwen/Qwen2.5-7B-Instruct for SQL generation tasks (DBBench).
Key characteristics:
- Base model: Qwen2.5-7B-Instruct
- Training method: bf16 LoRA (NOT QLoRA 4-bit) — zero rounding errors during merge
- Format: bfloat16 safetensors (no quantization)
- Size: ~15GB (9 shards)
- Compatible with: vLLM v0.13.0+, transformers, etc.
Training Details
LoRA Configuration
| Parameter | Value |
|---|---|
| LoRA rank (r) | 8 |
| LoRA alpha | 8 |
| LoRA dropout | 0 |
| Target modules | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj |
| Trainable params | ~0.14% of total |
Training Hyperparameters
| Parameter | Value |
|---|---|
| Learning rate | 2e-5 |
| Epochs | 0.3 |
| Batch size (effective) | 16 (1 × 16 grad accum) |
| Max sequence length | 4096 |
| LR scheduler | cosine |
| Optimizer | AdamW 8-bit |
| Warmup steps | 10 |
| Weight decay | 0.01 |
| Precision | bfloat16 |
Training Data
- Dataset: Multi-turn SQL conversation data (7,490 samples)
- Sources: Spider train + BIRD mini_dev
- Patterns: Direct query (40%), Exploration (30%), Correction (30%)
- Template-based generation (no LLM used for data synthesis)
Training Results
- Steps: 127
- Training time: 6.7 minutes (RTX 5090)
- Train loss: avg 1.30 (start ~2.0, end ~0.69)
- Eval loss: 0.709
- Peak VRAM: 19.0GB / 32GB
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model = AutoModelForCausalLM.from_pretrained(
"astom-M/matsuo-llm-advanced-dbbench-bf16",
torch_dtype=torch.bfloat16,
device_map="auto",
trust_remote_code=True
)
tokenizer = AutoTokenizer.from_pretrained(
"astom-M/matsuo-llm-advanced-dbbench-bf16",
trust_remote_code=True
)
vLLM
python -m vllm.entrypoints.openai.api_server \
--model astom-M/matsuo-llm-advanced-dbbench-bf16 \
--dtype bfloat16 \
--max-model-len 4096
Important Notes
- No quantization artifacts: This model was trained in bf16 full precision (not QLoRA 4-bit), so there are no rounding errors from quantization-to-bf16 merge.
config.jsondoes NOT containquantization_config— clean bf16 model.- All safetensor weights are in
torch.bfloat16dtype.
Compliance
- Base model: Qwen2.5-7B-Instruct (Apache 2.0 license, whitelisted for competition)
- Training data: Template-based synthetic data (no LLM-generated content)
- No inference code modification
- No RAG/ToolUse
- No commercial API usage
License
This model inherits the Apache 2.0 license from Qwen2.5-7B-Instruct.
- Downloads last month
- 15