Downloads · 30 days
0
mia-project-2025/pythia-1B-adapter-wikitext-103
pythia-1B-adapter-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 an AdaLoRA fine-tuned version of EleutherAI/pythia-1b trained on the WikiText-103 dataset. Adaptive LoRA (AdaLoRA) was applied for parameter-efficient fine-tuning on causal language modeling.
Downloads · 30 days
0
Access
Public
Updated Aug 30, 2025
Repo size
56.9 MB
Likes
0
Public
Click a slice to open those files.
.pt37.9 MB · 48%
From the Hugging Face model README
This repository contains an AdaLoRA fine-tuned version of EleutherAI/pythia-1b trained on the WikiText-103 dataset.
Adaptive LoRA (AdaLoRA) was applied for parameter-efficient fine-tuning on causal language modeling.
AdaLoRA improves on standard LoRA by dynamically allocating parameter ranks during training, enabling better trade-offs between efficiency and performance.
query_key_value, denser=8, init_r=12, target_r=4alpha=64, dropout=0.05orth_reg_weight=0.5tinit=100, tfinal=1000, deltaT=10)from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
from peft import PeftModel
# Load tokenizer
tokenizer = AutoTokenizer.from_pretrained("./Pythia-Adapter-wikitext")
# Load base model and AdaLoRA adapters
base_model = AutoModelForCausalLM.from_pretrained("EleutherAI/pythia-1b")
model = PeftModel.from_pretrained(base_model, "./Pythia-Adapter-wikitext")
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))