Text Generation
Transformers
Safetensors
English
gpt2
fine-tuned
india-finance
state-debt
chain-of-thought
rbi-data
text-generation-inference
Instructions to use Sushilmishrawork/india-state-debt-llm with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Sushilmishrawork/india-state-debt-llm with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Sushilmishrawork/india-state-debt-llm")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Sushilmishrawork/india-state-debt-llm") model = AutoModelForCausalLM.from_pretrained("Sushilmishrawork/india-state-debt-llm", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Sushilmishrawork/india-state-debt-llm with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Sushilmishrawork/india-state-debt-llm" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Sushilmishrawork/india-state-debt-llm", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Sushilmishrawork/india-state-debt-llm
- SGLang
How to use Sushilmishrawork/india-state-debt-llm with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Sushilmishrawork/india-state-debt-llm" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Sushilmishrawork/india-state-debt-llm", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Sushilmishrawork/india-state-debt-llm" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Sushilmishrawork/india-state-debt-llm", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Sushilmishrawork/india-state-debt-llm with Docker Model Runner:
docker model run hf.co/Sushilmishrawork/india-state-debt-llm
๐ฎ๐ณ India State Debt LLM (Chain-of-Thought Fiscal Reasoning Model)
A domain-specific Large Language Model fine-tuned on official Reserve Bank of India (RBI) and State Budget financial data for analyzing public liabilities, Debt-to-GSDP percentages, per-capita debt, national rankings, and multi-year growth trajectories (2020โ2026) across 31 Indian States and Union Territories.
Usage with Hugging Face transformers
from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
model_id = "your-hf-username/india-state-debt-llm"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id)
generator = pipeline("text-generation", model=model, tokenizer=tokenizer)
prompt = "Instruction: Display Karnataka debt growth from 2020-2026\nResponse:\n<thought>\n"
response = generator(prompt, max_new_tokens=300, temperature=0.7)
print(response[0]["generated_text"])
Response Output Structure
The model generates responses structured into 3 explicit Chain-of-Thought stages:
<thought>: Step-by-step query parsing, record identification, and fiscal metrics retrieval.<analysis>: Structured financial metrics, rank, per-capita figures, and category indicators.<answer>: Executive summary answer.
- Downloads last month
- -