Instructions to use kevineen/qwen3-4b-adv59-alfworld-dbbench with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kevineen/qwen3-4b-adv59-alfworld-dbbench with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="kevineen/qwen3-4b-adv59-alfworld-dbbench") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("kevineen/qwen3-4b-adv59-alfworld-dbbench") model = AutoModelForCausalLM.from_pretrained("kevineen/qwen3-4b-adv59-alfworld-dbbench", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use kevineen/qwen3-4b-adv59-alfworld-dbbench with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "kevineen/qwen3-4b-adv59-alfworld-dbbench" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kevineen/qwen3-4b-adv59-alfworld-dbbench", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/kevineen/qwen3-4b-adv59-alfworld-dbbench
- SGLang
How to use kevineen/qwen3-4b-adv59-alfworld-dbbench 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 "kevineen/qwen3-4b-adv59-alfworld-dbbench" \ --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": "kevineen/qwen3-4b-adv59-alfworld-dbbench", "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 "kevineen/qwen3-4b-adv59-alfworld-dbbench" \ --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": "kevineen/qwen3-4b-adv59-alfworld-dbbench", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use kevineen/qwen3-4b-adv59-alfworld-dbbench with Docker Model Runner:
docker model run hf.co/kevineen/qwen3-4b-adv59-alfworld-dbbench
qwen3-4b-adv59-alfworld-dbbench
This repository provides a merged model fine-tuned from Qwen/Qwen3-4B-Instruct-2507 using LoRA + Unsloth.
The LoRA adapter has been merged into the base model. This repository contains the full merged model weights.
Training Objective
This adapter is trained to improve multi-turn agent task performance on ALFWorld (household tasks) and DBBench (database operations).
Loss is applied to all assistant turns in the multi-turn trajectory, enabling the model to learn environment observation, action selection, tool use, and recovery from errors.
Training Configuration
- Base model: Qwen/Qwen3-4B-Instruct-2507
- Method: LoRA (full precision base)
- Max sequence length: 2048
- Epochs: 1
- Learning rate: 2e-6
- Warmup ratio: 0.05
- LoRA: r=64, alpha=64
- Target modules: q_proj, up_proj
Usage
With vLLM (Recommended for Docker Environment)
from vllm import LLM, SamplingParams
model = LLM(
model="kevineen/qwen3-4b-adv59-alfworld-dbbench",
max_model_len=8192,
gpu_memory_utilization=0.95,
)
prompts = [
"Your task is to: put a clean lettuce leaf in the fridge.",
# ... more prompts
]
sampling_params = SamplingParams(temperature=0.0, max_tokens=512)
outputs = model.generate(prompts, sampling_params)
for output in outputs:
print(output.outputs[0].text)
With Transformers
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_id = "kevineen/qwen3-4b-adv59-alfworld-dbbench"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.float16,
device_map="auto"
)
# Inference
messages = [{"role": "user", "content": "Your task here"}]
inputs = tokenizer.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
return_tensors="pt"
).to("cuda")
outputs = model.generate(**inputs, max_new_tokens=512)
print(tokenizer.decode(outputs[0]))
Sources & Terms (IMPORTANT)
Training data: ALFWorld + DBBench mixed dataset
Datasets:
- u-10bei/sft_alfworld_trajectory_dataset_v5
- u-10bei/dbbench_sft_dataset_react_v4
Dataset License: MIT License. This dataset is used and distributed under the terms of the MIT License.
Compliance: Users must comply with the MIT license (including copyright notice) and the base model's original terms of use.
- Downloads last month
- 14
Model tree for kevineen/qwen3-4b-adv59-alfworld-dbbench
Base model
Qwen/Qwen3-4B-Instruct-2507