Instructions to use ichi234/exp002_stage2_s2_db_merged with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ichi234/exp002_stage2_s2_db_merged with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ichi234/exp002_stage2_s2_db_merged") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ichi234/exp002_stage2_s2_db_merged") model = AutoModelForCausalLM.from_pretrained("ichi234/exp002_stage2_s2_db_merged") 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]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use ichi234/exp002_stage2_s2_db_merged with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ichi234/exp002_stage2_s2_db_merged" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ichi234/exp002_stage2_s2_db_merged", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ichi234/exp002_stage2_s2_db_merged
- SGLang
How to use ichi234/exp002_stage2_s2_db_merged 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 "ichi234/exp002_stage2_s2_db_merged" \ --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": "ichi234/exp002_stage2_s2_db_merged", "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 "ichi234/exp002_stage2_s2_db_merged" \ --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": "ichi234/exp002_stage2_s2_db_merged", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ichi234/exp002_stage2_s2_db_merged with Docker Model Runner:
docker model run hf.co/ichi234/exp002_stage2_s2_db_merged
llm2025 advanced exp002 stage2 s2_db model
本モデルは、アドバンスドコンペ(ALFWorld / DBBench)において、以下を両立することを目的に学習しました。
- ALFWorld:
THOUGHT+ACTIONの2行フォーマット安定化と合法行動率の維持 - DBBench:
Action: Operation/Action: Answer形式の安定化と SQL/回答の一致率向上
学習方針
1. Stage1
- ALF側の出力フォーマットと合法行動を安定化させるため、ALF寄りのフェーズを中心に学習。その後DB側の学習。
Stage1 フェーズ別設定(概要)
phaseA- 手法: LoRA(bfloat16)
- 最大シーケンス長: 2048
- エポック数: 0.60(
max_steps=1000) - 学習率:
1e-4 - LoRA パラメータ:
r=64, alpha=128
phaseB- 手法: LoRA(bfloat16)
- 最大シーケンス長: 2048
- エポック数: 0.20
- 学習率:
5e-5 - LoRA パラメータ:
r=64, alpha=128
phaseC_1_alf- 手法: LoRA(bfloat16)
- 最大シーケンス長: 2048
- エポック数: 0.12
- 学習率:
5e-5 - LoRA パラメータ:
r=64, alpha=128
phaseC_2_db- 手法: LoRA(bfloat16)
- 最大シーケンス長: 2048
- エポック数: 0.02
- 学習率:
5e-5 - LoRA パラメータ:
r=64, alpha=128
phaseC_3_alf- 手法: LoRA(bfloat16)
- 最大シーケンス長: 2048
- エポック数: 0.12
- 学習率:
5e-5 - LoRA パラメータ:
r=64, alpha=128
phaseD- 手法: LoRA(bfloat16)
- 最大シーケンス長: 2048
- エポック数: 0.08
- 学習率:
2e-5 - LoRA パラメータ:
r=64, alpha=128
2. Step2データ拡張
openai/gpt-oss-120bを使ったオフライン蒸留を実施。
3. Stage2
- Step2データ拡張で作成したデータをもとに学習。
Stage2設定(概要)
- 手法: LoRA(bfloat16)
- 最大シーケンス長: 4096
- エポック数: 0.40
- 学習率:
2e-5 - LoRA パラメータ:
r=64, alpha=128
使い方
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_id = "ichi234/exp002_stage2_s2_db_merged"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto",
)
ソースおよびライセンス(重要)
- ベースモデル:
Qwen/Qwen2.5-7B-Instruct - 学習データ:Creative Commons Attribution (CC-BY-4.0)。本データセットは、CC-BY-4.0 ライセンスの条項に基づき、使用および再配布が可能です。
- https://huggingface.co/datasets/u-10bei/sft_alfworld_trajectory_dataset_v3
- https://huggingface.co/datasets/u-10bei/sft_alfworld_trajectory_dataset_v4
- https://huggingface.co/datasets/u-10bei/sft_alfworld_trajectory_dataset_v5
- https://huggingface.co/datasets/u-10bei/dbbench_sft_dataset_react_v3
- https://huggingface.co/datasets/u-10bei/dbbench_sft_dataset_react_v4
- 蒸留 teacher:
openai/gpt-oss-120b - 遵守事項: 利用者は、データセットの帰属表記(クレジット)に関する要件、およびベースモデルの元の利用規約の両方を遵守する必要があります。
- Downloads last month
- 4