105 lines
2.6 KiB
Markdown
105 lines
2.6 KiB
Markdown
---
|
|
license: llama3.2
|
|
base_model: unsloth/llama-3.2-3b-instruct
|
|
library_name: transformers
|
|
pipeline_tag: text-generation
|
|
language:
|
|
- en
|
|
---
|
|
|
|
# Pramana Stage 0 (Full Merged Weights)
|
|
|
|
This folder contains **full merged weights** for the Stage 0 Nyaya-structured model. It does **not** require a LoRA adapter at inference time.
|
|
|
|
## What is included
|
|
|
|
- `model-00001-of-00002.safetensors`
|
|
- `model-00002-of-00002.safetensors`
|
|
- `model.safetensors.index.json`
|
|
- `config.json`, `tokenizer.json`, `tokenizer_config.json`, `chat_template.jinja`
|
|
- `nyaya-llama-3b-stage0-merged-q4.gguf` (quantized full model for Ollama)
|
|
|
|
## Base model
|
|
|
|
- `unsloth/llama-3.2-3b-instruct`
|
|
|
|
## Usage (Transformers)
|
|
|
|
```python
|
|
from transformers import AutoModelForCausalLM, AutoTokenizer
|
|
|
|
repo_id = "qbz506/nyaya-llama-3b-stage0"
|
|
subfolder = "full/nyaya-llama-3b-stage0-merged"
|
|
|
|
model = AutoModelForCausalLM.from_pretrained(
|
|
repo_id,
|
|
subfolder=subfolder,
|
|
torch_dtype="auto",
|
|
device_map="auto",
|
|
)
|
|
|
|
tokenizer = AutoTokenizer.from_pretrained(
|
|
repo_id,
|
|
subfolder=subfolder,
|
|
use_fast=True,
|
|
)
|
|
```
|
|
|
|
## Usage (Ollama with GGUF)
|
|
|
|
Download `nyaya-llama-3b-stage0-merged-q4.gguf`, then:
|
|
|
|
```bash
|
|
cat > Modelfile <<EOM
|
|
FROM ./nyaya-llama-3b-stage0-merged-q4.gguf
|
|
SYSTEM """
|
|
You are a Nyaya reasoning engine. Follow the exact output format provided.
|
|
"""
|
|
PARAMETER temperature 0
|
|
PARAMETER top_p 1
|
|
EOM
|
|
|
|
ollama create nyaya-llama-3b-stage0-merged-q4 -f Modelfile
|
|
ollama run nyaya-llama-3b-stage0-merged-q4 "<your prompt>"
|
|
```
|
|
|
|
## Prompting
|
|
|
|
Use the exact Nyaya section headers for best adherence:
|
|
|
|
```
|
|
## Samshaya (Doubt Analysis)
|
|
## Pramana (Sources of Knowledge)
|
|
## Pancha Avayava (5-Member Syllogism)
|
|
## Tarka (Counterfactual Reasoning)
|
|
## Hetvabhasa (Fallacy Check)
|
|
## Nirnaya (Ascertainment)
|
|
```
|
|
|
|
## Intended use
|
|
|
|
This model is tuned for structured 6-phase Nyaya reasoning on logic-style problems. It is research-grade and optimized for format adherence over open-ended creativity.
|
|
|
|
## Limitations
|
|
|
|
- Responses may be verbose due to strict format.
|
|
- Best results require the exact section headers and a system prompt.
|
|
- Not evaluated for safety-critical domains.
|
|
Paper: [Pramana: Fine-Tuning Large Language Models for Epistemic Reasoning through Navya-Nyaya](https://arxiv.org/abs/2604.04937)
|
|
## Citations
|
|
|
|
|
|
If you use this model/dataset, please cite:
|
|
|
|
```bibtex
|
|
@misc{sathish2026pramanafinetuninglargelanguage,
|
|
title={Pramana: Fine-Tuning Large Language Models for Epistemic Reasoning through Navya-Nyaya},
|
|
author={Sharath Sathish},
|
|
year={2026},
|
|
eprint={2604.04937},
|
|
archivePrefix={arXiv},
|
|
primaryClass={cs.AI},
|
|
url={https://arxiv.org/abs/2604.04937},
|
|
}
|
|
|