Instructions to use ProjectGlue/smollm3-dolly-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ProjectGlue/smollm3-dolly-lora with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ProjectGlue/smollm3-dolly-lora") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("ProjectGlue/smollm3-dolly-lora", device_map="auto") - PEFT
How to use ProjectGlue/smollm3-dolly-lora with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ProjectGlue/smollm3-dolly-lora with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ProjectGlue/smollm3-dolly-lora" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ProjectGlue/smollm3-dolly-lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ProjectGlue/smollm3-dolly-lora
- SGLang
How to use ProjectGlue/smollm3-dolly-lora with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "ProjectGlue/smollm3-dolly-lora" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ProjectGlue/smollm3-dolly-lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "ProjectGlue/smollm3-dolly-lora" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ProjectGlue/smollm3-dolly-lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ProjectGlue/smollm3-dolly-lora with Docker Model Runner:
docker model run hf.co/ProjectGlue/smollm3-dolly-lora
SmolLM3-3B Dolly LoRA
A LoRA fine-tuned adapter for SmolLM3-3B, trained on a 500-row subset of the Databricks Dolly 15k closed QA dataset as part of a structured HuggingFace learning curriculum.
Model Details
Model Description
- Developed by: ProjectGlue
- Model type: Causal Language Model with LoRA adapter
- Language(s): English
- License: Apache 2.0
- Finetuned from: HuggingFaceTB/SmolLM3-3B
Uses
Direct Use
Question answering with provided context. Load the base SmolLM3-3B model with this LoRA adapter for improved closed QA responses.
Out-of-Scope Use
Not intended for production use. This is a learning exercise and proof-of-concept fine-tuning run.
How to Get Started with the Model
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
base_model = AutoModelForCausalLM.from_pretrained(
"HuggingFaceTB/SmolLM3-3B",
torch_dtype=torch.float16,
device_map="auto"
)
model = PeftModel.from_pretrained(base_model, "ProjectGlue/smollm3-dolly-lora")
tokenizer = AutoTokenizer.from_pretrained("HuggingFaceTB/SmolLM3-3B")
Training Details
Training Data
500-row subset of the Databricks Dolly 15k dataset, filtered to the closed_qa category. Formatted using SmolLM3's chat template with system, user, and assistant roles.
Training Hyperparameters
- Method: LoRA (Low-Rank Adaptation)
- LoRA rank: 16
- LoRA alpha: 32
- Target modules: q_proj, k_proj, v_proj, o_proj
- Dropout: 0.05
- Trainable parameters: 7,667,712 (0.25% of total)
- Epochs: 1
- Batch size: 1 (gradient accumulation steps: 8)
- Learning rate: 2e-4
- Precision: fp16
Evaluation
Results
- Initial loss: 1.824
- Final loss: 1.505
- Loss decreased consistently over 63 steps indicating successful training.
Environmental Impact
- Hardware Type: NVIDIA T4 GPU (16GB)
- Hours used: ~0.1
- Cloud Provider: Google Colab
- Compute Region: US
Model Card Authors
ProjectGlue