How to use from
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 "activeDap/Qwen-1_8B_hh_helpful" \
    --host 0.0.0.0 \
    --port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
	-H "Content-Type: application/json" \
	--data '{
		"model": "activeDap/Qwen-1_8B_hh_helpful",
		"prompt": "Once upon a time,",
		"max_tokens": 512,
		"temperature": 0.5
	}'
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 "activeDap/Qwen-1_8B_hh_helpful" \
        --host 0.0.0.0 \
        --port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
	-H "Content-Type: application/json" \
	--data '{
		"model": "activeDap/Qwen-1_8B_hh_helpful",
		"prompt": "Once upon a time,",
		"max_tokens": 512,
		"temperature": 0.5
	}'
Quick Links

Qwen-1_8B Fine-tuned on sft-hh-data

This model is a fine-tuned version of Qwen/Qwen-1_8B on the activeDap/sft-hh-data dataset.

Training Results

Training Loss

Training Statistics

Metric Value
Total Steps 19
Final Training Loss 2.2879
Min Training Loss 2.2879
Training Runtime 7.75 seconds
Samples/Second 153.51

Training Configuration

Parameter Value
Base Model Qwen/Qwen-1_8B
Dataset activeDap/sft-hh-data
Number of Epochs 1.0
Per Device Batch Size 16
Gradient Accumulation Steps 1
Total Batch Size 64 (4 GPUs)
Learning Rate 2e-05
LR Scheduler cosine
Warmup Ratio 0.1
Max Sequence Length 512
Optimizer adamw_torch_fused
Mixed Precision BF16

Usage

from transformers import AutoModelForCausalLM, AutoTokenizer

model_name = "activeDap/Qwen-1_8B_sft-hh-data"

tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name)

# Format input with prompt template
prompt = "What is machine learning?\nAssistant:"
inputs = tokenizer(prompt, return_tensors="pt")

# Generate response
outputs = model.generate(**inputs, max_new_tokens=100)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)

Training Framework

  • Library: Transformers + TRL
  • Training Type: Supervised Fine-Tuning (SFT)
  • Format: Prompt-completion with Assistant-only loss

Citation

If you use this model, please cite the original base model and dataset:

@misc{ultrafeedback2023,
      title={UltraFeedback: Boosting Language Models with High-quality Feedback},
      author={Ganqu Cui and Lifan Yuan and Ning Ding and others},
      year={2023},
      eprint={2310.01377},
      archivePrefix={arXiv}
}
Downloads last month
3
Safetensors
Model size
2B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for activeDap/Qwen-1_8B_hh_helpful

Base model

Qwen/Qwen-1_8B
Finetuned
(5)
this model

Paper for activeDap/Qwen-1_8B_hh_helpful