Downloads · 30 days
0
iravikr/phi1-numpy-pandas-qlora
phi1-numpy-pandas-qlora is a text generation model from iravikr. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
This repository provides a fine-tuned variant of :contentReference[oaicite:0]{index=0} that improves Python code generation for NumPy and Pandas–based data analysis tasks.
Downloads · 30 days
0
Access
Public
Updated Jan 21, 2026
Repo size
18.9 MB
Likes
0
Public
Click a slice to open those files.
.safetensors18.9 MB · 80%
From the Hugging Face model README
This repository provides a fine-tuned variant of :contentReference[oaicite:0]{index=0} that improves Python code generation for NumPy and Pandas–based data analysis tasks.
The model addresses a known limitation of the base Phi-1 model, which was trained primarily on Python scripts using a very limited set of standard libraries.
The original Phi-1 model documentation states that 99.8% of its Python training data only uses:
As a result, the base model may:
This project demonstrates that targeted, low-rank fine-tuning (QLoRA) can significantly mitigate this limitation.
This fine-tuning focuses exclusively on:
numpypandasread_csv)mean, sum, count)np.where, .to_numpy())microsoft/phi-1Only LoRA adapter weights were trained; the base model weights remain unchanged.
Depending on the repository variant, this repo contains:
adapter_model.bin (or .safetensors)adapter_config.jsonfrom transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_model = AutoModelForCausalLM.from_pretrained(
"microsoft/phi-1",
load_in_4bit=True,
device_map="auto"
)
model = PeftModel.from_pretrained(
base_model,
"iravikr/phi1-numpy-pandas-qlora"
)
tokenizer = AutoTokenizer.from_pretrained(
"iravikr/phi1-numpy-pandas-qlora"
)