tinyforge: fine-tuned on a 4 GB GPU
Collection
Adapters trained and checked with tinyforge (github.com/rajratangm/tinyforge). Each card lists its caveats. • 2 items • Updated
How to use RajGMore/tinyforge-llama3.1-8b-sql-lora with PEFT:
from peft import PeftModel
from transformers import AutoModelForCausalLM
base_model = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-3.1-8B-Instruct")
model = PeftModel.from_pretrained(base_model, "RajGMore/tinyforge-llama3.1-8b-sql-lora")A 14 MB LoRA adapter (r=16) trained with tinyforge on a 4 GB RTX 3050 Ti laptop GPU using layer streaming: 200 steps in 9.5 minutes. Training data: 1,800 question/SQL pairs over six public seaborn tables (titanic, mpg, tips, car_crashes, planets, healthexp), each answer verified by executing the SQL. Use under the Llama 3.1 Community License.
100 questions about a table the model never saw (penguins), served with llama.cpp (adapter f16 on a Q4_K_M base), greedy decoding.
| Model | Execution accuracy |
|---|---|
| This adapter | 100% |
| Base told to "reply with exactly one SQLite query" | 93% |
Caveats, honestly:
MAX/MIN call, so the gain is consistency, not new capability.eval_results.json.from transformers import AutoModelForCausalLM
from peft import PeftModel
base = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-3.1-8B-Instruct", device_map="auto")
model = PeftModel.from_pretrained(base, "RajGMore/tinyforge-llama3.1-8b-sql-lora")
Base model
meta-llama/Llama-3.1-8B