âš¡ RIFA Edge 0.6B

Compact coding assistant with security awareness.
Write code · debug · explain · prefer safer patterns.

Part of the RIFA series by SM Shahbaj
Nano (0.5B) · Edge (0.6B) · Flash (1.7B) · Pro (3B)


Why Edge

Size ~0.6B — practical on modest GPUs / quantized CPU
Focus Code generation, debugging, concept explanations
Security lens Common pitfalls (injection, secrets, weak auth) + safer alternatives
Languages English · বাংলা · Banglish
Style Direct answers (thinking mode off)

Trained with a coding-heavy mix: high-quality instruction→code data, OSS-grounded problems, and educational secure-coding examples (vulnerable pattern + fix). Identity locked to SM Shahbaj / RIFA Edge.


Quick start

from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

model_id = "smshahbaj/RIFA-Edge-0.6B"
tok = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
    model_id, torch_dtype=torch.float16, device_map="auto", trust_remote_code=True
)

messages = [{"role": "user", "content": "Write a Python function that safely hashes a password."}]
prompt = tok.apply_chat_template(
    messages, tokenize=False, add_generation_prompt=True, enable_thinking=False
)
inputs = tok(prompt, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=256, do_sample=True, temperature=0.5, top_p=0.9)
print(tok.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))

Training summary

  • Method: QLoRA (4-bit NF4) → LoRA r=32 / α=64 → merge to FP16
  • Objective: Completion-only loss on assistant turns
  • Data: Code instructions + OSS-style problems + educational secure coding + light general/Bangla + repeated identity
  • Thinking: disabled

Intended use

  • Local / offline coding help
  • Learning secure defaults while writing features
  • Bangla / Banglish coding chat

Limitations

  • Small model: weaker on very long multi-file reasoning and rare APIs
  • No live knowledge — fixed "Sorry…" line when appropriate
  • Always review generated code before production; security guidance is educational, not a substitute for professional audit

License

Apache 2.0

RIFA Edge · SM Shahbaj

Available formats

This repository contains the original model release plus additional runtime formats.

Transformers / Safetensors

The original Transformers/Safetensors files remain in this repository.

GGUF

Generated GGUF files are stored under GGUF/:

  • RIFA-Edge-0.6B-F16.gguf
  • RIFA-Edge-0.6B-Q8_0.gguf
  • RIFA-Edge-0.6B-Q6_K.gguf
  • RIFA-Edge-0.6B-Q5_K_M.gguf
  • RIFA-Edge-0.6B-Q4_K_M.gguf

LoRA

No standalone LoRA adapter was found. A LoRA adapter cannot be reconstructed from a merged model alone.

GGUF files are quantized exports of the same model, not separate fine-tunes.

Downloads last month
-
Safetensors
Model size
0.6B params
Tensor type
F16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support