Dedicated Endpoints

Run this model inference on single tenant GPU with unmatched speed and reliability at scale.

Learn more
Container

Run this model inference with full control and performance in your environment.

Learn more

Get help setting up a custom Dedicated Endpoints.

Talk with our engineer to get a quote for reserved GPU instances with discounts.

README

License: apache-2.0

Model Details

  • Base model: HuggingFaceTB/SmolLM-135M (135M parameters)
  • Fine-tuning method: SFT (LoRA) → DPO (LoRA)
  • SFT dataset: databricks/databricks-dolly-15k (6,000 samples)
  • DPO dataset: Intel/orca_dpo_pairs (3,000 samples)
  • Developed by: Areeba Fatima (IBA Karachi — NLP with Deep Learning, Assignment 04)
  • Language: English
  • License: Apache 2.0

Training Details

Best SFT Configuration (Trial 3)

  • LoRA rank: 32, alpha: 64
  • Target modules: q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj
  • Learning rate: 2e-4, epochs: 2, batch size: 2
  • Validation loss: 2.2008

Best DPO Configuration

  • Beta: [your best beta]
  • Learning rate: [your best LR]
  • Epochs: [your best epochs]
  • Validation loss: [your val loss]

Evaluation Results (10-prompt test set)

StageAvg BLEUCorpus BLEUAvg BERTScore
Base (no tuning)0.10430.08640.7957
Best SFT (Trial 3)0.15130.11120.8210
Best DPO0.02640.01480.7221

How to Use

python

from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
import torch
base = AutoModelForCausalLM.from_pretrained("HuggingFaceTB/SmolLM-135M")
tokenizer = AutoTokenizer.from_pretrained("AREEBAFATIMA12/SmolLM-135M-SFT-DPO")
model = PeftModel.from_pretrained(base, "AREEBAFATIMA12/SmolLM-135M-SFT-DPO")
model.eval()
prompt = "<|user|>\nWhat causes seasons on Earth?</s>\n<|assistant|>\n"
inputs = tokenizer(prompt, return_tensors="pt")
with torch.no_grad():
out = model.generate(**inputs, max_new_tokens=150, do_sample=False,
pad_token_id=tokenizer.eos_token_id)
print(tokenizer.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))

Model provider

AREEBAFATIMA12

Model tree

Base

HuggingFaceTB/SmolLM-135M

Adapter

this model

Modalities

Input

Text

Output

Text

Pricing

Dedicated Endpoints

View details

Supported Functionality

Model APIs

Dedicated Endpoints

Container

More information

Explore FriendliAI today