CoolFace
Modelpublic

teclabs/Llama-3.1-8b-Instruct-Ind-Tax-Act-1961

sourceHugging Facellama3.1updated 10mo agoView on Hugging Face
0likes78downloads
Model Card

Llama 3.1 8B - Indian Income Tax Act 1961 (GGUF)

Fine-tuned Llama 3.1 8B Instruct model specialized in the Indian Income Tax Act 1961. Optimized for tax law queries, compliance questions, and section references.

๐ŸŽฏ Model Details

  • โ€”Base Model: meta-llama/Meta-Llama-3.1-8B-Instruct
  • โ€”Fine-tuning Method: LoRA (r=64, alpha=64) with Unsloth
  • โ€”Training Date: 20251201
  • โ€”Context Length: 4096 tokens
  • โ€”Format: GGUF (ready for llama.cpp, Ollama, LM Studio, Jan, etc.)
  • โ€”Specialization: Indian Income Tax Act 1961

๐Ÿ“ฆ Available Quantizations

FileSizeUse CaseRAM RequiredQuality
q4_k_m~4.5GBRecommended - Best balance6-8GBโญโญโญโญ
q5_k_m~5.5GBHigh quality responses8-10GBโญโญโญโญโญ
q8_0~8GBNear-original quality10-12GBโญโญโญโญโญ
f16~15GBMaximum quality (if available)18-20GBโญโญโญโญโญ

Quantization Guide

  • โ€”q4_k_m: Best for most users - good quality, reasonable size
  • โ€”q5_k_m: Better quality with slight size increase
  • โ€”q8_0: Minimal quality loss, larger file
  • โ€”f16: Full precision, largest file

๐Ÿš€ Quick Start

Using Ollama

  1. 1.Download the model file (e.g., q4km) wget https://huggingface.co/teclabs/Llama-3.1-8b-Instruct-Ind-Tax-Act-1961/resolve/main/llama-tax-act-q4km.gguf
  1. 1.Create Modelfile cat > Modelfile << 'EOF' FROM ./llama-tax-act-q4km.gguf

PARAMETER temperature 0.7 PARAMETER topp 0.9 PARAMETER topk 40 PARAMETER repeat_penalty 1.1

SYSTEM """You are an expert on the Indian Income Tax Act 1961. Provide accurate, detailed information about tax regulations, exemptions, deductions, and compliance requirements. Always cite relevant sections when applicable.""" EOF

  1. 1.Create the model ollama create llama-tax-act -f Modelfile
  1. 1.Run it ollama run llama-tax-act

Using llama.cpp

Download model wget https://huggingface.co/teclabs/Llama-3.1-8b-Instruct-Ind-Tax-Act-1961/resolve/main/llama-tax-act-q4km.gguf

Run inference ./llama-cli -m llama-tax-act-q4km.gguf -p "Explain Section 80C deductions:" -n 512

Download model wget https://huggingface.co/teclabs/Llama-3.1-8b-Instruct-Ind-Tax-Act-1961/resolve/main/llama-tax-act-q4km.gguf

Run inference ./llama-cli -m llama-tax-act-q4km.gguf -p "Explain Section 80C deductions:" -n 512

from llama_cpp import Llama

Load model llm = Llama( modelpath="./llama-tax-act-q4km.gguf", nctx=4096, nthreads=8, ngpu_layers=35 # Adjust based on your GPU )

Generate response output = llm( "What are the tax implications under Section 54?", maxtokens=512, temperature=0.7, topp=0.9, )

print(output['choices']['text'])

๐Ÿ’ก Example Queries

Q: What are the deductions available under Chapter VI-A? Q: Explain Section 80C and its limit for FY 2023-24 Q: What is the difference between Section 80C and 80D? Q: How is capital gains tax calculated under Section 112A? Q: What are the exemptions available under Section 10?

๐Ÿ“Š Training Details

  • โ€”Training Hardware: NVIDIA A100 80GB
  • โ€”Training Time: ~7 minutes (including quantization)
  • โ€”Dataset: Custom corpus from Income Tax Act 1961
  • โ€”Epochs: Optimized for convergence
  • โ€”Learning Rate: 2e-4 with cosine schedule
  • โ€”Precision: BF16 training, quantized for deployment

โš™๏ธ Technical Specifications

  • โ€”Architecture: Llama 3.1 (8B parameters)
  • โ€”Vocabulary: 128,256 tokens
  • โ€”Max Context: 4096 tokens
  • โ€”Attention: Grouped-Query Attention (GQA)
  • โ€”Activation: SwiGLU
  • โ€”LoRA Rank: 64 (higher than standard for better quality)

๐Ÿ“ˆ Performance

  • โ€”Inference Speed (q4km on RTX 3090): ~40-50 tokens/sec
  • โ€”Inference Speed (q4km on M1 Max): ~25-35 tokens/sec
  • โ€”Quality: Specialized responses with section references

โš ๏ธ Limitations

  • โ€”Trained on Income Tax Act 1961 as of training date (20251201)
  • โ€”May not reflect latest amendments after this date
  • โ€”Should be used as reference only, not legal advice
  • โ€”Always verify with official sources

๐Ÿ“œ License

This model inherits the Llama 3.1 Community License.

๐Ÿ™ Acknowledgments

  • โ€”Meta AI for Llama 3.1 base model
  • โ€”Unsloth AI for efficient fine-tuning framework
  • โ€”ggerganov for llama.cpp and GGUF format

๐Ÿ“ง Contact

For questions or issues, please open an issue on the repository.

๐Ÿ”„ Updates

2025-12-01: Initial release with q4km, q5km, q8_0 quantizations


Disclaimer: This model is for educational and research purposes. Tax laws are complex and subject to change. Always consult qualified tax professionals for advice.