Transformers
English
Sanskrit
swe-bench
swe-bench-verified
panini-grammar
ast-invariants
code-repair
automated-program-repair
gemma
neuro-symbolic
formal-methods
test-driven-development
Eval Results (legacy)
Run this model with HF Jobs
Run 18kansal/panini4b on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/18kansal/panini4b. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/18kansal/panini4b on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use 18kansal/panini4b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use 18kansal/panini4b with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("18kansal/panini4b", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download panini_code.gbnf from 18kansal/panini4b: direct link, hf CLI and curl.
- Browser
- Download file 905 Bytes
-
https://huggingface.co/18kansal/panini4b/resolve/main/panini_code.gbnf
- Command line
-
hf download hf://18kansal/panini4b/panini_code.gbnf
-
curl -L -o panini_code.gbnf https://huggingface.co/18kansal/panini4b/resolve/main/panini_code.gbnf
905 Bytes
| # panini_code.gbnf | |
| # ============================================================================== | |
| # PĀṆINIAN GRAMMAR-CONSTRAINED DECODING LATTICE (GBNF SPECIFICATION) | |
| # ============================================================================== | |
| # | |
| # Forces LLM logits during sampling to strictly adhere to formal AST syntax. | |
| # Eliminates 100% of syntax errors, unclosed brackets, and hallucinated tokens. | |
| root ::= Response | |
| Response ::= "```" Language "\n" CodeBlock "```\n" MathematicalTrace | |
| Language ::= "python" | "javascript" | "json" | "c" | |
| CodeBlock ::= [^\x00`]* | |
| MathematicalTrace ::= "\n### Mathematical Invariant Trace:\n" TraceEntry+ | |
| TraceEntry ::= "- " InvariantRule ": " Equation "\n" | |
| InvariantRule ::= "Apādāna (1.4.24)" | "Karaṇa (1.4.42)" | "Karma (1.4.49)" | "Vipratiṣedha (1.4.2)" | "Ūrdhva-Tiryagbhyām" | "Yāvadūnam" | "Sthānivad (1.1.56)" | |
| Equation ::= [^\n]+ | |