Bharat-Tiny-LLM Fused

This is a pre-fused version of Bharat-Tiny-LLM — base model weights + LoRA adapter fused into a single model.safetensors for direct use with Transformers.

Base model: Qwen/Qwen2.5-1.5B Adapter: eulogik/Bharat-Tiny-LLM-adapter

Why This Exists

The MLX-trained LoRA adapter cannot be loaded with PEFT/Transformers due to a fundamental MLX ↔ PEFT LoRA implementation mismatch. This fused model bypasses PEFT entirely by fusing the LoRA weights directly into the base model weights.

Quick Start

from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained("eulogik/Bharat-Tiny-LLM-fused")
tokenizer = AutoTokenizer.from_pretrained("eulogik/Bharat-Tiny-LLM-fused")

prompt = "<|im_start|>user\nChai peete hain?<|im_end|>\n<|im_start|>assistant\n"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=50, temperature=0.7)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

Fusion Details

  • The LoRA weights were fused on MPS (Apple Silicon) in float16 precision
  • Save uses direct safetensors (not model.save_pretrained which corrupts fused weights)
  • Fused weights differ from base weights by 0.003–0.024 across 112 modified tensors
  • Model dtype: float16 (3.55 GB)

Limitations

  • Experimental quality: 76K LoRA iterations is insufficient for reliable Hinglish generation. Output quality varies.
  • 5.3M trainable params (0.34% of 1.5B) is too few to strongly influence the base model.
  • Not production-ready — intended as a research demo.

License

Apache 2.0

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

Datasets used to train eulogik/Bharat-Tiny-LLM-fused

Space using eulogik/Bharat-Tiny-LLM-fused 1