SmolLM2-135M LoRA Adapter (Step 6)

Model Details

Model Description

This repository contains the LoRA (Low-Rank Adaptation) adapter weights fine-tuned on top of MrHungLe01/SmolLM2-135M-Instruction-Tuned.

This project is part of Step 6: Deep Dive into LoRA, focusing on Parameter-Efficient Fine-Tuning (PEFT) using matrix decomposition to reduce memory footprint while maintaining downstream performance.

  • Developed by: MrHungLe01
  • Model type: PEFT (LoRA Adapter)
  • Language(s) (NLP): English / Vietnamese
  • Finetuned from model: MrHungLe01/SmolLM2-135M-Instruction-Tuned

Uses

Direct Use

This adapter is intended for mentor evaluation and testing text generation tasks. It requires the base model to be loaded concurrently.

Out-of-Scope Use

This model is a lightweight experiment and should not be deployed in production environments or safety-critical applications.


How to Get Started with the Model

You can load and evaluate this adapter using the following snippet:

from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel

base_model_id = "MrHungLe01/SmolLM2-135M-Instruction-Tuned"
adapter_id = "MrHungLe01/SmolLM2-135M-LoRA-Adapter" # Update with your exact repo name

# 1. Load Base Model
model = AutoModelForCausalLM.from_pretrained(base_model_id, device_map="auto")
tokenizer = AutoTokenizer.from_pretrained(base_model_id)

# 2. Load and Apply LoRA Weights
model = PeftModel.from_pretrained(model, adapter_id)

# 3. Quick Inference Test
inputs = tokenizer("Explain the concept of LoRA in one sentence:", return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=50)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Downloads last month
81
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for CTU-ai-lab/SmolLM2-135M-LoRA-Adapter

Space using CTU-ai-lab/SmolLM2-135M-LoRA-Adapter 1