Downloads · 30 days
0
mia-project-2025/pythia-1B-LoRA-wikitext-103
pythia-1B-LoRA-wikitext-103 is a machine learning model from mia-project-2025. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
This repository contains a LoRA fine-tuned version of EleutherAI/pythia-1b trained on the WikiText-103 dataset. LoRA adapters were applied to efficiently fine-tune the model for causal language modeling while keeping…
Downloads · 30 days
0
Access
Public
Updated Aug 30, 2025
Repo size
38 MB
Likes
0
Public
Click a slice to open those files.
.pt25.3 MB · 45%
From the Hugging Face model README
This repository contains a LoRA fine-tuned version of EleutherAI/pythia-1b trained on the WikiText-103 dataset.
LoRA adapters were applied to efficiently fine-tune the model for causal language modeling while keeping the majority of parameters frozen.
LoRA introduces trainable rank-decomposition matrices into the attention and dense layers of the model, allowing efficient fine-tuning with reduced compute and memory costs compared to full parameter updates.
query_key_value, denser=8, alpha=64, dropout=0.1from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
from peft import PeftModel
# Load tokenizer
tokenizer = AutoTokenizer.from_pretrained("./pythia-wikitext-lora")
# Load base model and LoRA adapters
base_model = AutoModelForCausalLM.from_pretrained("EleutherAI/pythia-1b")
model = PeftModel.from_pretrained(base_model, "./pythia-wikitext-lora")
model.eval()
# Example
input_text = "The history of natural language processing"
inputs = tokenizer(input_text, return_tensors="pt")
with torch.no_grad():
outputs = model.generate(**inputs, max_length=50)
print("Generated:", tokenizer.decode(outputs[0], skip_special_tokens=True))