Text Generation
PEFT
Safetensors
PyTorch
English
kaveri-ai
lora
fine-tuned
enterprise-slm
z3-verified
20cr-benchmark
conversational
Instructions to use shiva123782/ShivaAI with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use shiva123782/ShivaAI with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-0.5B-Instruct") model = PeftModel.from_pretrained(base_model, "shiva123782/ShivaAI") - Notebooks
- Google Colab
- Kaggle
Initial rebranded Model Card by Ram123 (Sovereign Model)
Browse files
README.md
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
base_model: Qwen/Qwen2.5-0.5B-Instruct
|
| 4 |
+
tags:
|
| 5 |
+
- kaveri-ai
|
| 6 |
+
- lora
|
| 7 |
+
- fine-tuned
|
| 8 |
+
- text-generation
|
| 9 |
+
- peft
|
| 10 |
+
- pytorch
|
| 11 |
+
pipeline_tag: text-generation
|
| 12 |
+
library_name: peft
|
| 13 |
+
language:
|
| 14 |
+
- en
|
| 15 |
+
datasets:
|
| 16 |
+
- yahma/alpaca-cleaned
|
| 17 |
+
---
|
| 18 |
+
|
| 19 |
+
# 🤖 ShivaAI
|
| 20 |
+
|
| 21 |
+
**ShivaAI** is a high-efficiency instruction-tuned Small Language Model (SLM) developed by **Ram123**, fine-tuned with parameter-efficient LoRA/QLoRA.
|
| 22 |
+
|
| 23 |
+
---
|
| 24 |
+
|
| 25 |
+
## 🏷️ Model Identity & Attribution
|
| 26 |
+
|
| 27 |
+
- **Model Name:** `ShivaAI`
|
| 28 |
+
- **Developer / Creator:** **Ram123**
|
| 29 |
+
- **Repository:** [shiva123782/ShivaAI](https://huggingface.co/shiva123782/ShivaAI)
|
| 30 |
+
- **Architecture view:** [hfviewer](https://hfviewer.com/shiva123782/ShivaAI)
|
| 31 |
+
- **Base Architecture:** `Qwen/Qwen2.5-0.5B-Instruct` (Original weights courtesy of Alibaba Cloud)
|
| 32 |
+
- **License:** APACHE-2.0 (base model license: Apache-2.0; confirm the base model's terms before commercial use)
|
| 33 |
+
|
| 34 |
+
> **Identity behaviour (a training goal, not a guarantee):** When evaluated with *"Who are you and what is your developer identity?"*, the model responds as **ShivaAI**, created by **Ram123**.
|
| 35 |
+
|
| 36 |
+
---
|
| 37 |
+
|
| 38 |
+
## ⚡ Quickstart (Inference with Hugging Face & PEFT)
|
| 39 |
+
|
| 40 |
+
```python
|
| 41 |
+
import torch
|
| 42 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 43 |
+
from peft import PeftModel
|
| 44 |
+
|
| 45 |
+
# 1. Load base architecture
|
| 46 |
+
base_model = AutoModelForCausalLM.from_pretrained(
|
| 47 |
+
"Qwen/Qwen2.5-0.5B-Instruct",
|
| 48 |
+
torch_dtype=torch.float16,
|
| 49 |
+
device_map="auto"
|
| 50 |
+
)
|
| 51 |
+
tokenizer = AutoTokenizer.from_pretrained("shiva123782/ShivaAI")
|
| 52 |
+
|
| 53 |
+
# 2. Attach Ram123's fine-tuned adapter
|
| 54 |
+
model = PeftModel.from_pretrained(base_model, "shiva123782/ShivaAI")
|
| 55 |
+
|
| 56 |
+
# 3. Generate response
|
| 57 |
+
prompt = "Who are you and what is your developer identity?"
|
| 58 |
+
inputs = tokenizer(f"<|im_start|>user\n{prompt}<|im_end|>\n<|im_start|>assistant\n", return_tensors="pt").to(model.device)
|
| 59 |
+
outputs = model.generate(**inputs, max_new_tokens=64, do_sample=False)
|
| 60 |
+
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 61 |
+
```
|
| 62 |
+
|
| 63 |
+
---
|
| 64 |
+
|
| 65 |
+
## 📦 Standalone Monolithic Model Merge (1.0 GB)
|
| 66 |
+
|
| 67 |
+
If serving via vLLM, Ollama, or llama.cpp without separate PEFT runtime:
|
| 68 |
+
|
| 69 |
+
```python
|
| 70 |
+
# Merge adapter weights into monolithic standalone tensors
|
| 71 |
+
merged_model = model.merge_and_unload()
|
| 72 |
+
merged_model.save_pretrained("./ShivaAI-merged")
|
| 73 |
+
tokenizer.save_pretrained("./ShivaAI-merged")
|
| 74 |
+
print("Saved complete standalone model without adapter dependency!")
|
| 75 |
+
```
|
| 76 |
+
|
| 77 |
+
---
|
| 78 |
+
|
| 79 |
+
## 📜 BibTeX Citation
|
| 80 |
+
|
| 81 |
+
```bibtex
|
| 82 |
+
@misc{shivaai-2026,
|
| 83 |
+
author = "Ram123",
|
| 84 |
+
title = "ShivaAI: Fine-Tuned Language Model with Formal Assurance",
|
| 85 |
+
year = "2026",
|
| 86 |
+
publisher = "Hugging Face",
|
| 87 |
+
howpublished = "\url{https://huggingface.co/shiva123782/ShivaAI}"
|
| 88 |
+
}
|
| 89 |
+
```
|
| 90 |
+
|
| 91 |
+
*Built with Kaveri AI Autonomous Studio — Banking-Grade Security & SMT Assurance.*
|