How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-generation", model="madhueb/MNLP_M2_dpo_model")
messages = [
    {"role": "user", "content": "Who are you?"},
]
pipe(messages)
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("madhueb/MNLP_M2_dpo_model")
model = AutoModelForCausalLM.from_pretrained("madhueb/MNLP_M2_dpo_model", 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=40)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))
Quick Links
  • Developed by: Madeleine Hueber
  • Language(s) (NLP): English
  • License: For academic use only
  • Finetuned from model: Qwen3-0.6B-Base

This model is a preference-aligned language model fine-tuned for answering STEM-related instruction prompts. It was developed as part of the M2 deliverable for the CS-552 course Modern Natural Language Processing.

Training Details:

  • Stage 1: Instruction tuning on a subset of TIGER-Lab/WebInstructSub (200k data , aivalable on the train_instruct split of madhueb/MNLP_M2_dpo_dataset )

  • Stage 2: DPO fine-tuning using the train split of madhueb/MNLP_M2_dpo_dataset.

Downloads last month
9
Safetensors
Model size
0.6B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train madhueb/MNLP_M2_dpo_model