初始化项目,由ModelHub XC社区提供模型
Model: astom-M/matsuo-llm-advanced-phase-imdb1 Source: Original Platform
This commit is contained in:
79
README.md
Normal file
79
README.md
Normal file
@@ -0,0 +1,79 @@
|
||||
---
|
||||
base_model: Qwen/Qwen2.5-7B-Instruct
|
||||
library_name: transformers
|
||||
license: apache-2.0
|
||||
pipeline_tag: text-generation
|
||||
tags:
|
||||
- agent
|
||||
- sft
|
||||
- lora
|
||||
- sql
|
||||
- household-tasks
|
||||
---
|
||||
|
||||
# Agent Model - Matsuo LLM Advanced Competition (Phase IMDB1)
|
||||
|
||||
Fine-tuned model for DB operation (SQL) and household navigation tasks.
|
||||
|
||||
## Model Details
|
||||
|
||||
- **Base Model**: [Qwen/Qwen2.5-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct)
|
||||
- **Training Method**: Supervised Fine-Tuning (SFT) with QLoRA + Instruction Masking
|
||||
- **LoRA Configuration**: r=32, alpha=64
|
||||
- **Training Data**: 6,750 samples (DB operation + household task trajectories)
|
||||
|
||||
## Training Details
|
||||
|
||||
### Data Composition
|
||||
- **DB operation data**: SQL query generation samples including Spider/BIRD public datasets and Qwen2.5-72B-Instruct distilled samples
|
||||
- **Household task data**: Synthetic agent trajectories for navigation and manipulation tasks
|
||||
- **Total**: 6,750 samples
|
||||
|
||||
### Training Configuration
|
||||
- **Epochs**: 1.0
|
||||
- **Batch Size**: 4 (effective: 16 with gradient accumulation)
|
||||
- **Learning Rate**: 5e-6 (cosine schedule, 5% warmup)
|
||||
- **Max Sequence Length**: 4096
|
||||
- **Quantization**: 4-bit QLoRA during training, merged to bf16 for inference
|
||||
- **Special**: Instruction Masking (loss computed only on assistant response tokens)
|
||||
|
||||
## Quick Start
|
||||
|
||||
```python
|
||||
from transformers import AutoModelForCausalLM, AutoTokenizer
|
||||
|
||||
model_name = "astom-M/matsuo-llm-advanced-phase-imdb1"
|
||||
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
||||
model = AutoModelForCausalLM.from_pretrained(model_name, device_map="auto")
|
||||
|
||||
messages = [
|
||||
{"role": "user", "content": "Your task here..."}
|
||||
]
|
||||
|
||||
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
||||
inputs = tokenizer(text, return_tensors="pt").to(model.device)
|
||||
|
||||
outputs = model.generate(**inputs, max_new_tokens=512, temperature=0.1)
|
||||
response = tokenizer.decode(outputs[0][inputs['input_ids'].shape[1]:], skip_special_tokens=True)
|
||||
print(response)
|
||||
```
|
||||
|
||||
## Framework Versions
|
||||
|
||||
- Transformers: 4.57.6
|
||||
- PyTorch: 2.10.0
|
||||
- PEFT: 0.11.0
|
||||
- TRL: 0.24.0
|
||||
- Unsloth: 2025.5.8
|
||||
|
||||
## License
|
||||
|
||||
Apache 2.0 (same as base model Qwen2.5-7B-Instruct)
|
||||
|
||||
## Model Development
|
||||
|
||||
This model was trained for the Matsuo Lab LLM Advanced Competition 2025:
|
||||
- Approved base model: Qwen2.5-7B-Instruct
|
||||
- Training method: SFT with QLoRA (r=32, alpha=64) + Instruction Masking
|
||||
- Data: Synthetic DB operation + household task trajectories (no ALFWorld or AgentBench data used)
|
||||
- Distillation source: Qwen2.5-72B-Instruct (whitelist model)
|
||||
Reference in New Issue
Block a user