Gianloko/apex-coder-training-data
Viewer β’ Updated β’ 8.99k β’ 46 β’ 1
How to use Gianloko/apex-coder-1.5b-lora with PEFT:
from peft import PeftModel
from transformers import AutoModelForCausalLM
base_model = AutoModelForCausalLM.from_pretrained("Gianloko/apex-coder-1.5b")
model = PeftModel.from_pretrained(base_model, "Gianloko/apex-coder-1.5b-lora")How to use Gianloko/apex-coder-1.5b-lora with Unsloth Studio:
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Gianloko/apex-coder-1.5b-lora to start chatting
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Gianloko/apex-coder-1.5b-lora to start chatting
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Gianloko/apex-coder-1.5b-lora to start chatting
pip install unsloth
from unsloth import FastModel
model, tokenizer = FastModel.from_pretrained(
model_name="Gianloko/apex-coder-1.5b-lora",
max_seq_length=2048,
)Last updated: 2026-03-20 β Cycle 2
Lightweight LoRA adapter (~150 MB) for the ApexCoder model.
Apply on top of Gianloko/apex-coder-1.5b β no need to re-download the full 3 GB merged model every cycle.
| Adapter config | Value |
|---|---|
| Base model | Gianloko/apex-coder-1.5b |
| LoRA rank (r) | 32 |
| LoRA alpha | 64 |
| Target modules | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj, embed_tokens, lm_head |
| Training loss | 0.2274 |
| Metric | Value |
|---|---|
| LLM-as-judge (avg) | 12.6/15 |
| Perplexity | 1.14 |
| Ξ vs previous cycle | +12.6 |
| Type | Status | Score | Progress |
|---|
| Cycle | Date | Score | PPL | Ξ | vs Published |
|---|---|---|---|---|---|
| 1 | 2026-03-20 | 12.9/15 | 1.17 | +12.9 | 12.9 |
| 2 | 2026-03-20 | 12.6/15 | 1.14 | +12.6 | 13.2 |
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
# Load base model
base = AutoModelForCausalLM.from_pretrained(
"Gianloko/apex-coder-1.5b",
torch_dtype=torch.bfloat16,
device_map="auto",
)
tokenizer = AutoTokenizer.from_pretrained("Gianloko/apex-coder-1.5b")
# Apply LoRA adapter
model = PeftModel.from_pretrained(base, "Gianloko/apex-coder-1.5b-lora")
model = model.merge_and_unload() # optional: fuse weights for faster inference
messages = [
{"role": "system", "content": "You are ApexCoder, a world-class Salesforce expert."},
{"role": "user", "content": "Write a bulkified Apex trigger on Opportunity..."},
]
inputs = tokenizer.apply_chat_template(
messages, return_tensors="pt", add_generation_prompt=True
).to(model.device)
output = model.generate(inputs, max_new_tokens=512, temperature=0.1, do_sample=False)
print(tokenizer.decode(output[0][inputs.shape[1]:], skip_special_tokens=True))
Apache 2.0
Base model
Qwen/Qwen2.5-3B