Run this model with HF Jobs

Run activeDap/Qwen2-1.5B_hh_helpful on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/activeDap/Qwen2-1.5B_hh_helpful. Ask me which dataset to train on, then push the LoRA adapter to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs and Transformers to run batch inference with https://huggingface.co/activeDap/Qwen2-1.5B_hh_helpful on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the predictions back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs and Lighteval to evaluate https://huggingface.co/activeDap/Qwen2-1.5B_hh_helpful. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/activeDap/Qwen2-1.5B_hh_helpful with Transformers and bitsandbytes. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

Qwen2-1.5B Fine-tuned on sft-hh-data

This model is a fine-tuned version of Qwen/Qwen2-1.5B on the activeDap/sft-hh-data dataset.

Training Results

Training Loss

Training Statistics

Metric Value
Total Steps 19
Final Training Loss 2.1474
Min Training Loss 2.1474
Training Runtime 6.76 seconds
Samples/Second 176.04

Training Configuration

Parameter Value
Base Model Qwen/Qwen2-1.5B
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/Qwen2-1.5B_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
11
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/Qwen2-1.5B_hh_helpful

Base model

Qwen/Qwen2-1.5B
Finetuned
(86)
this model

Paper for activeDap/Qwen2-1.5B_hh_helpful