Views
No views yet
ai4bharat/indic-instruct-data-v0.1 — anudesh (Hindi split): native crowd-sourced Hindi instructionsai4bharat/indic-instruct-data-v0.1 — dolly (Hindi split, filtered to chrF ≥ 60): broad instruction variety| Hyperparameter | Value |
|---|---|
| LoRA rank | 32 |
| LoRA alpha | 64 |
| LoRA dropout | 0.0 |
| Target modules | q, k, v, o, gate, up, down |
| Batch size (effective) | 16 |
| Learning rate | 2e-4 |
| LR scheduler | cosine |
| Warmup steps | 15 |
| Epochs | 2 |
| Total steps | 500 |
| Precision | fp16 (4-bit base) |
| Hardware | NVIDIA Tesla T4 (Colab) |
| Training time | ~60 minutes |
| Final training loss | 1.108 |
1from transformers import AutoModelForCausalLM, AutoTokenizer
2import torch
3
4model_id = "pankajpandey-dev/MiniCPM5-1B-Hindi-Instruct"
5
6tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
7model = AutoModelForCausalLM.from_pretrained(
8 model_id,
9 torch_dtype=torch.float16,
10 device_map="auto",
11 trust_remote_code=True,
12)
13
14messages = [
15 {"role": "user", "content": "नमस्ते! बारिश के दिन पर एक छोटी कविता लिखो।"}
16]
17
18inputs = tokenizer.apply_chat_template(
19 messages,
20 add_generation_prompt=True,
21 return_tensors="pt",
22).to(model.device)
23
24outputs = model.generate(
25 inputs,
26 max_new_tokens=256,
27 temperature=0.7,
28 top_p=0.9,
29 do_sample=True,
30 repetition_penalty=1.1,
31)
32print(tokenizer.decode(outputs[0][inputs.shape[-1]:], skip_special_tokens=True))lora_adapter/ folder of this repo:1from peft import PeftModel
2from transformers import AutoModelForCausalLM, AutoTokenizer
3
4base = AutoModelForCausalLM.from_pretrained("openbmb/MiniCPM5-1B", trust_remote_code=True)
5model = PeftModel.from_pretrained(base, "pankajpandey-dev/MiniCPM5-1B-Hindi-Instruct", subfolder="lora_adapter")1@misc{pandey2026minicpm5hindi,
2 title = {MiniCPM5-1B-Hindi-Instruct},
3 author = {Pankaj Pandey},
4 year = {2026},
5 url = {https://huggingface.co/pankajpandey-dev/MiniCPM5-1B-Hindi-Instruct}
6}