Text Generation
Transformers
English
rabbit_ssm
state-space-model
rtassm
rabbit
custom-architecture
causal-lm
tool-use
frontier
research
anvaya
rtaforge
custom_code
Instructions to use RtaForge/Anvaya-Rabbit-2.7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use RtaForge/Anvaya-Rabbit-2.7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="RtaForge/Anvaya-Rabbit-2.7B", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("RtaForge/Anvaya-Rabbit-2.7B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use RtaForge/Anvaya-Rabbit-2.7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "RtaForge/Anvaya-Rabbit-2.7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RtaForge/Anvaya-Rabbit-2.7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/RtaForge/Anvaya-Rabbit-2.7B
- SGLang
How to use RtaForge/Anvaya-Rabbit-2.7B 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 "RtaForge/Anvaya-Rabbit-2.7B" \ --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": "RtaForge/Anvaya-Rabbit-2.7B", "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 "RtaForge/Anvaya-Rabbit-2.7B" \ --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": "RtaForge/Anvaya-Rabbit-2.7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use RtaForge/Anvaya-Rabbit-2.7B with Docker Model Runner:
docker model run hf.co/RtaForge/Anvaya-Rabbit-2.7B
| language: | |
| - en | |
| license: apache-2.0 | |
| tags: | |
| - ssm | |
| - state-space-model | |
| - causal-lm | |
| - rabbit | |
| - rtaforge | |
| - proof-of-concept | |
| base_model: RtaForge/Anvaya-Rabbit-2.7B | |
| # Anvaya-Rabbit 2.7B β v0.1 Alpha | |
| > **The architecture, training protocol, and infrastructure are the story.** | |
| Rabbit is the first model in the Anvaya series β a proof of concept demonstrating | |
| that a fully custom State-Space Model (SSM) can be trained from scratch, on a | |
| single consumer-grade GPU, with no dependence on attention or transformer | |
| building blocks. | |
| This is not a production model. It is the opening move in a deliberate curriculum: | |
| **Rabbit β Raccoon β Polar Bear.** The benchmarks below are a baseline, not a claim. | |
| ## Architecture | |
| - **Type**: αΉta-SSM v7.2.2, Fortress Unbroken β recurrent SSM, no attention | |
| - **Parameters**: ~2.7B (post-subsumination) | |
| - **Layers**: 64 | |
| - **d_model / d_state**: 2560 | |
| - **Vocabulary**: 50,280 (GPT-NeoX tokenizer) | |
| - **Precision**: bfloat16 | |
| - **Training seq_len**: 64 | |
| ## Weights | |
| This repository contains the base pretrained checkpoint | |
| (`base/Anvaya-Rabbit-2.7B-0.1-alpha-base.pt`) and the SFT imprint checkpoint | |
| (`imprint/Anvaya-Rabbit-2.7B-0.1-alpha-imprint.pt`). | |
| Load the imprint weights (base + SFT overlay, recommended for inference): | |
| ```python | |
| from white_rabbit.rabbit_model import create_rabbit_model | |
| from transformers import AutoTokenizer | |
| import torch | |
| model = create_rabbit_model( | |
| vocab_size=50280, | |
| durga_variant="fu-64", # 64-layer Fortress Unbroken backbone | |
| ) | |
| sd = torch.load("imprint/Anvaya-Rabbit-2.7B-0.1-alpha-imprint.pt", map_location="cpu") | |
| model.load_state_dict(sd, strict=False) | |
| model.eval() | |
| tokenizer = AutoTokenizer.from_pretrained("EleutherAI/gpt-neox-20b") | |
| ``` | |
| > **Requires**: `rtaforge-substrates` (private repository β contact | |
| > guha@rtaforge.in for access). This model uses a custom SSM architecture | |
| > not compatible with standard HuggingFace `AutoModel`. | |
| **Training infrastructure**: [`Rta-Forge/polaris-revival`](https://github.com/Rta-Forge/polaris-revival) β | |
| patched ROCm 7.2 runtime restoring native HIP dispatch on gfx803 (RX 560X), with | |
| fused SSM recurrence kernels. MIT licensed. | |
| ## Training | |
| Two proprietary components make this training regime possible: | |
| - **Subsuminator** β migrates learned weights across architectures without | |
| retraining from scratch, enabling efficient curriculum transfer. | |
| - **Gurukul** β a constitutional Sisya/Guru proposal-validation loop. Sisya | |
| proposes weight deltas; Guru validates them against constitutional constraints | |
| before applying. Strong learning signals extracted from limited data and compute. | |
| Together they are why Rabbit trained in 7 days on a single consumer GPU. | |
| **1,500 accepted Gurukul proposals across 6 phases on a single AceCloud L4 (24GB VRAM). | |
| ~7 days effective training time (total elapsed higher due to crash recovery and VRAM | |
| leak debugging).** | |
| | Phase | Proposals | Dataset | Focus | | |
| |-------|-----------|---------|-------| | |
| | 0 | 125 | CAMEL Physics | Physical reasoning | | |
| | 1 | 125 | CAMEL Chemistry | Chemical reasoning | | |
| | 2 | 125 | CAMEL Biology | Biological reasoning | | |
| | 3 | 250 | Raccoon Phase 1 | General reasoning | | |
| | 4 | 500 | Rabbit E2 Phase 4 | Extended curriculum | | |
| | 5 | 375 | Raccoon Phase 3 (consolidation re-run) | Pattern consolidation | | |
| **Final checkpoint: Step 1,500.** seq_len=64, batch_size=3, optimizer=Lion, lr=1e-5. | |
| SFT imprint applied using surface-only gate-layer fine-tuning (65 examples, 3 epochs), | |
| trained with the Anvaya Gurukul protocol. | |
| ## Evaluation Results (Step 1,500) | |
| ### Internal β Scale-Invariant Metrics | |
| Evaluated using Top-K accuracy and Mean Reciprocal Rank vs. a randomly initialised | |
| baseline of identical architecture. 50 samples per corpus, seq_len=64. | |
| | Metric | Random Init | Trained (Step 1,500) | Gain | | |
| |--------|-------------|----------------------|------| | |
| | Top-1 Accuracy (aggregate) | 0.24% | **1.90%** | **~8Γ** | | |
| | Top-10 Accuracy (aggregate) | 0.24% | **35.84%** | **~149Γ** | | |
| | MRR (aggregate) | 0.0026 | **0.1724** | **~66Γ** | | |
| | MRR β Deep Math | 0.0084 | **0.186** | **22Γ** | | |
| | Top-10 β Biology | ~1.3% | **~12%** | **~10Γ** | | |
| | Top-10 β Chemistry | ~1.3% | **~13%** | **~10Γ** | | |
| These gains are measured against a randomly initialised model of identical | |
| architecture β they reflect what the training curriculum taught, not absolute | |
| capability. | |
| ### Commercial Benchmarks (lm-eval harness) | |
| > **Standard academic benchmarks are not yet meaningful here.** Rabbit was | |
| > deliberately trained at seq_len=64 as a pure architecture proof. Standard | |
| > lm-eval prompts (few-shot examples + question) run 150β400 tokens β well | |
| > beyond Rabbit's training context. Raccoon (seq_len=512) removes this | |
| > constraint entirely. | |
| | Benchmark | Score | Notes | | |
| |-----------|-------|-------| | |
| | HellaSwag | 25.89% | Prompt exceeds training seq_len | | |
| | ARC-Challenge | 26.71% | Prompt exceeds training seq_len | | |
| | MMLU | 26.89% | Prompt exceeds training seq_len | | |
| | WinoGrande | 48.62% | Prompt exceeds training seq_len | | |
| | TruthfulQA MC1 | 21.91% | Prompt exceeds training seq_len | | |
| ## What Comes Next | |
| | Model | Params | seq_len | Status | | |
| |-------|--------|---------|--------| | |
| | **Rabbit** | ~2.7B | 64 | β This model β v0.1 Alpha | | |
| | **Raccoon** | ~6.1B | 512 | In training β reasoning curriculum (math Γ2, logic Γ2) | | |
| | **Polar Bear** | ~13B | 512 | Planned β STEM + AEVA anti-hallucination layer | | |
| The delta between Rabbit and Raccoon is the story. One epoch β two epochs, | |
| seq_len 64 β 512, 2.7B β 6.1B. Same pipeline, same hardware philosophy. | |
| **Give us more resources and watch what happens.** | |