Downloads · 30 days
62
57% of all-time downloads
ProfRutPatel/geopolitics-india-qwen2.5-0.5b-lora
geopolitics-india-qwen2.5-0.5b-lora is a machine learning model from ProfRutPatel. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft. The card lists the license as apache-2.0.
Fine-tuned Qwen2.5-0.5B-Instruct on Global Geopolitical Challenges and India's Response using 4-bit QLoRA on an NVIDIA RTX 3050.
Downloads · 30 days
62
57% of all-time downloads
All-time downloads
109
Public
Repo size
29 MB
Likes
0
Public
Click a slice to open those files.
.json34.3 MB · 66%
From the Hugging Face model README
Fine-tuned Qwen2.5-0.5B-Instruct on Global Geopolitical Challenges and India's Response using 4-bit QLoRA on an NVIDIA RTX 3050.
| Parameter | Value |
|---|---|
| Base model | Qwen/Qwen2.5-0.5B-Instruct (500M params) |
| Method | QLoRA (LoRA r=16, alpha=32, NF4 4-bit) |
| Trainable params | 1,081,344 / 495M (0.22%) |
| Epochs | 3 |
| GPU | NVIDIA RTX 3050 Laptop |
| Training time | 48 seconds |
| Final train loss | 3.027 |
| Token accuracy | 49.4% |
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-0.5B-Instruct")
tokenizer = AutoTokenizer.from_pretrained("ProfRutPatel/geopolitics-india-qwen2.5-0.5b-lora")
model = PeftModel.from_pretrained(base, "ProfRutPatel/geopolitics-india-qwen2.5-0.5b-lora")
messages = [{"role": "user", "content": "What are India's key geopolitical challenges?"}]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors='pt')
out = model.generate(**inputs, max_new_tokens=200)
print(tokenizer.decode(out[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))
India faces strategic dependencies in the Indian Ocean, regional security tensions, cybersecurity threats, growing Middle East influence disputes, resource management challenges, and serious climate change impacts on its economy and infrastructure.