Downloads · 30 days
12
22% of all-time downloads
DSTI/DS-RLHF-1.7B
DS-RLHF-1.7B is a text generation model from DSTI. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
This model is a fine-tuned version of SmolLM2-1.7B-Instruct using ORPO (Odds Ratio Preference Optimization), a reinforcement learning from human feedback (RLHF) method.
Downloads · 30 days
12
22% of all-time downloads
All-time downloads
54
Public
Repo size
72.4 MB
Likes
1
Public
Click a slice to open those files.
.safetensors72.4 MB · 94%
From the Hugging Face model README
This model is a fine-tuned version of SmolLM2-1.7B-Instruct using ORPO (Odds Ratio Preference Optimization), a reinforcement learning from human feedback (RLHF) method.
Use the code below to get started with the model.
from huggingface_hub import login
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
tokenizer = AutoTokenizer.from_pretrained("unsloth/SmolLM2-1.7B-Instruct",)
base_model = AutoModelForCausalLM.from_pretrained(
"unsloth/SmolLM2-1.7B-Instruct",
device_map={"": 0}
)
model = PeftModel.from_pretrained(base_model,"DSTI/DS-RLHF-1.7B")
prompt = """Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
{}
### Input:
{}
### Response:
{}"""
inputs = tokenizer(
[
prompt.format(
"You are an AI assistant that helps people find information",
"What is the k-Means Clustering algorithm and what is it's purpose?",
"",
)
],
return_tensors="pt",
).to("cuda")
from transformers import TextStreamer
text_streamer = TextStreamer(tokenizer)
_ = model.generate(**inputs, streamer=text_streamer, max_new_tokens=1800)
If you use this model, please cite:
The source dataset: Anas989898/DPO-datascience
@misc{DS-RLHF-1.7B,
title = {ORPO (Odds Ratio Preference Optimization) on data science–related samples},
author = {Rustam Shiriyev},
year = {2025}
}