Downloads · 30 days
7
14% of all-time downloads
jsmall12/DataSci-Coder-14B-LoRA
DataSci-Coder-14B-LoRA is a text generation model from jsmall12. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
[](https://github.com/jacksonSmall/DataSci-Coder)
Downloads · 30 days
7
14% of all-time downloads
All-time downloads
51
Public
Repo size
287 MB
Likes
0
Public
Click a slice to open those files.
.safetensors275 MB · 96%
From the Hugging Face model README
A QLoRA fine-tuned adapter for Qwen2.5-Coder-14B-Instruct optimized for data science code generation. The model outputs clean, runnable Python code with zero explanatory text — strictly following code-only instructions.
| Metric | DS-Tuned (FT) | Base Model | Delta |
|---|---|---|---|
| Hard Eval (12 complex tasks) | 12/12 | 12/12 | Tie |
| Constraint Compliance | 93.3% | 91.4% | +1.9% |
| Code-Only Compliance | 10/10 | 6/10 | +67% |
| Code Ratio | 100% | 87.9% | +12.1% |
| Parameter | Value |
|---|---|
| Base Model | unsloth/Qwen2.5-Coder-14B-Instruct-bnb-4bit |
| Method | QLoRA (4-bit quantization) |
| LoRA Rank | 16 |
| LoRA Alpha | 32 |
| LoRA Targets | q/k/v/o_proj, gate/up/down_proj |
| Trainable Parameters | 68.8M / 14.8B (0.46%) |
| Training Examples | 10,795 |
| Epochs | 1 |
| Final Loss | 0.5933 |
| Training Time | 1.9 hours on NVIDIA L40S |
| Precision | bfloat16 |
| Optimizer | Paged AdamW 8-bit |
| Learning Rate | 3e-5 (cosine schedule) |
| Effective Batch Size | 16 (1 x 16 grad accum) |
10,795 curated data science instruction-response pairs from:
All examples filtered for Python code quality, data science relevance, and length. Categories: machine learning, deep learning, statistics, data wrangling, visualization, NLP, time series, numerical computing.
from unsloth import FastLanguageModel
import torch
model, tokenizer = FastLanguageModel.from_pretrained(
model_name="jsmall12/DataSci-Coder-14B-LoRA",
max_seq_length=2048,
load_in_4bit=True,
dtype=None,
)
FastLanguageModel.for_inference(model)
messages = [
{"role": "system", "content": "You are an expert data science coding assistant. Respond ONLY with clean, runnable Python code. Use inline comments for explanation. No text outside code blocks."},
{"role": "user", "content": "Write a function to train a logistic regression model with sklearn and print the classification report."},
]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt").to("cuda")
with torch.no_grad():
output = model.generate(
**inputs,
max_new_tokens=1024,
temperature=0.1,
do_sample=True,
top_p=0.9,
repetition_penalty=1.15,
use_cache=False,
)
response = tokenizer.decode(output[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True)
print(response)
All 12 tasks produced correct, complete, runnable implementations:
| Category | Tasks | Score |
|---|---|---|
| Statistics | Bayesian A/B testing, Kaplan-Meier survival analysis, time series CV + ARIMA, VIF + Ridge/Lasso/ElasticNet | 4/4 |
| Machine Learning | Stacking ensemble, SHAP importance, Isolation Forest, TF-IDF + SVM pipeline | 4/4 |
| Deep Learning | LR scheduler (warmup + cosine), BiLSTM + attention, VAE, GAN | 4/4 |
| Test | FT | Base | Delta |
|---|---|---|---|
| C01 Multi-step data cleaning | 8/8 | 8/8 | 0 |
| C02 Complete ML pipeline | 12/12 | 12/12 | 0 |
| C03 Statistical hypothesis test | 9/9 | 7/9 | +2 |
| C04 PyTorch architecture | 9/9 | 7/9 | +2 |
| C05 EDA visualizations | 11/12 | 10/12 | +1 |
| C06 Cross-validated pipeline | 12/12 | 12/12 | 0 |
| C07 Time series ARIMA | 9/10 | 10/10 | -1 |
| C08 DL training function | 8/10 | 8/10 | 0 |
| C09 Pandas method chain | 10/10 | 10/10 | 0 |
| C10 Model evaluation | 10/13 | 12/13 | -2 |
| Total | 98/105 | 96/105 | +2 |
Apache 2.0