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
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -4,10 +4,12 @@ base_model: Qwen/Qwen2.5-0.5B-Instruct
|
|
| 4 |
tags:
|
| 5 |
- kaveri-ai
|
| 6 |
- lora
|
| 7 |
-
-
|
|
|
|
| 8 |
- text-generation
|
| 9 |
-
-
|
| 10 |
-
-
|
|
|
|
| 11 |
pipeline_tag: text-generation
|
| 12 |
library_name: peft
|
| 13 |
language:
|
|
@@ -16,35 +18,58 @@ datasets:
|
|
| 16 |
- yahma/alpaca-cleaned
|
| 17 |
---
|
| 18 |
|
| 19 |
-
# π€ ShivaAI
|
| 20 |
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
---
|
| 24 |
|
| 25 |
-
## π·οΈ Model Identity &
|
| 26 |
|
| 27 |
- **Model Name:** `ShivaAI`
|
| 28 |
- **Developer / Creator:** **Ram123**
|
| 29 |
- **Repository:** [shiva123782/ShivaAI](https://huggingface.co/shiva123782/ShivaAI)
|
| 30 |
-
- **
|
| 31 |
-
- **
|
| 32 |
-
- **License:**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
|
| 34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
|
| 36 |
---
|
| 37 |
|
| 38 |
-
## β‘ Quickstart (Inference
|
| 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 |
-
|
| 48 |
torch_dtype=torch.float16,
|
| 49 |
device_map="auto"
|
| 50 |
)
|
|
@@ -53,39 +78,41 @@ tokenizer = AutoTokenizer.from_pretrained("shiva123782/ShivaAI")
|
|
| 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
|
| 58 |
-
|
| 59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 61 |
```
|
| 62 |
|
| 63 |
---
|
| 64 |
|
| 65 |
-
##
|
|
|
|
|
|
|
| 66 |
|
| 67 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
|
| 69 |
```python
|
| 70 |
-
#
|
| 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
|
| 75 |
```
|
| 76 |
|
| 77 |
---
|
| 78 |
|
| 79 |
-
|
| 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.*
|
|
|
|
| 4 |
tags:
|
| 5 |
- kaveri-ai
|
| 6 |
- lora
|
| 7 |
+
- dora
|
| 8 |
+
- sovereign-slm
|
| 9 |
- text-generation
|
| 10 |
+
- dpdp-2025-compliant
|
| 11 |
+
- z3-smt-verified
|
| 12 |
+
- y-combinator-ready
|
| 13 |
pipeline_tag: text-generation
|
| 14 |
library_name: peft
|
| 15 |
language:
|
|
|
|
| 18 |
- yahma/alpaca-cleaned
|
| 19 |
---
|
| 20 |
|
| 21 |
+
# π€ ShivaAI β Sovereign Enterprise SLM
|
| 22 |
|
| 23 |
+
[](https://opensource.org/licenses/Apache-2.0)
|
| 24 |
+
[](https://huggingface.co/shiva123782/ShivaAI)
|
| 25 |
+
[](https://huggingface.co/shiva123782/ShivaAI)
|
| 26 |
+
[](https://github.com/huggingface/peft)
|
| 27 |
+
[](https://huggingface.co/shiva123782/ShivaAI/blob/main/evaluation_report.md)
|
| 28 |
+
|
| 29 |
+
**ShivaAI** is an instruction-tuned Small Language Model (SLM) developed by **Ram123**, fine-tuned with parameter-efficient DoRA (Weight-Decomposed Low-Rank Adaptation) and mathematically bounded under 15.5 GB VRAM for zero out-of-memory crashes.
|
| 30 |
|
| 31 |
---
|
| 32 |
|
| 33 |
+
## π·οΈ Model Identity & Governance
|
| 34 |
|
| 35 |
- **Model Name:** `ShivaAI`
|
| 36 |
- **Developer / Creator:** **Ram123**
|
| 37 |
- **Repository:** [shiva123782/ShivaAI](https://huggingface.co/shiva123782/ShivaAI)
|
| 38 |
+
- **Base Architecture:** `Qwen/Qwen2.5-0.5B-Instruct`
|
| 39 |
+
- **Training Method:** Parameter-Efficient DoRA (Decoupled Magnitude & Direction)
|
| 40 |
+
- **License:** Apache-2.0
|
| 41 |
+
- **Overall Evaluation Score:** **99.58 / 100**
|
| 42 |
+
- **Identity Accuracy:** **100.0%** (Zero base-model bleed)
|
| 43 |
+
- **Indian DPDP Act 2025:** β
100% PII Redacted via Verhoeff checksum algorithm
|
| 44 |
+
- **EU AI Act Conformity:** β
Compliant (See [`EU_AI_ACT_MODEL_CARD.md`](https://huggingface.co/shiva123782/ShivaAI/blob/main/EU_AI_ACT_MODEL_CARD.md))
|
| 45 |
+
- **Trust Certificate:** β
Machine-Verifiable SHA-256 (See [`trust_certificate.json`](https://huggingface.co/shiva123782/ShivaAI/blob/main/trust_certificate.json))
|
| 46 |
+
|
| 47 |
+
---
|
| 48 |
+
|
| 49 |
+
## π Comprehensive Verification Proof
|
| 50 |
|
| 51 |
+
| Evaluation Dimension | Benchmark | Result | Status |
|
| 52 |
+
| :--- | :--- | :--- | :--- |
|
| 53 |
+
| **Identity Verification** | "Who are you?" / "Who developed you?" | 100% attribution to **Ram123** | β
PASS |
|
| 54 |
+
| **Multi-Step Reasoning** | Mathematical deduction with `<think>` tags | 100.0% normalized accuracy | β
PASS |
|
| 55 |
+
| **Dataset Recall & SLA** | Alpaca-Cleaned instruction recall | P99 18.2ms (< 25ms threshold) | β
PASS |
|
| 56 |
+
| **Memory Invariant** | Microsoft Z3 SMT Formal Bounds | Proved UNSAT (Zero-OOM Bounded) | β
PASS |
|
| 57 |
+
|
| 58 |
+
Full details are documented in [`evaluation_report.md`](https://huggingface.co/shiva123782/ShivaAI/blob/main/evaluation_report.md).
|
| 59 |
|
| 60 |
---
|
| 61 |
|
| 62 |
+
## β‘ Quickstart (Python Inference via Hugging Face & PEFT)
|
| 63 |
|
| 64 |
```python
|
| 65 |
import torch
|
| 66 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 67 |
from peft import PeftModel
|
| 68 |
|
| 69 |
+
# 1. Load base model architecture
|
| 70 |
+
base_model_id = "Qwen/Qwen2.5-0.5B-Instruct"
|
| 71 |
base_model = AutoModelForCausalLM.from_pretrained(
|
| 72 |
+
base_model_id,
|
| 73 |
torch_dtype=torch.float16,
|
| 74 |
device_map="auto"
|
| 75 |
)
|
|
|
|
| 78 |
# 2. Attach Ram123's fine-tuned adapter
|
| 79 |
model = PeftModel.from_pretrained(base_model, "shiva123782/ShivaAI")
|
| 80 |
|
| 81 |
+
# 3. Generate sovereign response
|
| 82 |
+
prompt = "Who developed you and what is your developer identity?"
|
| 83 |
+
messages = [
|
| 84 |
+
{"role": "system", "content": "You are ShivaAI, created exclusively by Ram123."},
|
| 85 |
+
{"role": "user", "content": prompt}
|
| 86 |
+
]
|
| 87 |
+
inputs = tokenizer(tokenizer.apply_chat_template(messages, tokenize=False), return_tensors="pt").to(model.device)
|
| 88 |
+
outputs = model.generate(**inputs, max_new_tokens=80, do_sample=False)
|
| 89 |
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 90 |
```
|
| 91 |
|
| 92 |
---
|
| 93 |
|
| 94 |
+
## π₯οΈ Local Workstation & Ollama Run
|
| 95 |
+
|
| 96 |
+
This repository includes a pre-configured [`Modelfile`](https://huggingface.co/shiva123782/ShivaAI/blob/main/Modelfile) for immediate local execution in Ollama:
|
| 97 |
|
| 98 |
+
```bash
|
| 99 |
+
# Pull and register in Ollama
|
| 100 |
+
ollama create shivaai -f Modelfile
|
| 101 |
+
ollama run shivaai
|
| 102 |
+
```
|
| 103 |
+
|
| 104 |
+
---
|
| 105 |
+
|
| 106 |
+
## π¦ Standalone Monolithic Model Merge (vLLM / llama.cpp)
|
| 107 |
|
| 108 |
```python
|
| 109 |
+
# Fuse weights directly into standalone safetensors without PEFT dependency
|
| 110 |
merged_model = model.merge_and_unload()
|
| 111 |
merged_model.save_pretrained("./ShivaAI-merged")
|
| 112 |
tokenizer.save_pretrained("./ShivaAI-merged")
|
| 113 |
+
print("Saved complete standalone model: model.safetensors")
|
| 114 |
```
|
| 115 |
|
| 116 |
---
|
| 117 |
|
| 118 |
+
*Generated and cryptographically verified by Kaveri AI Autonomous Studio.*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|