tantra-ai-labs/AstraGPT-7B
AstraGPT-7B π
<div align="center">
A 7-Billion Parameter Decoder-Only Language Model
Custom BPE Tokenizer Training Β· Reasoning Fine-Tuned with LoRA on Dual RTX 4090
 ![Params]() ![Context]()  
Built by Aditya Wakharkar | Tantra AI Labs | Portfolio
</div>
π§ What is AstraGPT-7B?
AstraGPT-7B is a 7-billion parameter decoder-only language model built and trained by Tantra AI Labs β including a custom BPE tokenizer trained from scratch (64k vocabulary, later mapped to the 152k runtime vocab) and a full supervised fine-tuning pipeline written in PyTorch.
The model was reasoning fine-tuned via LoRA on a private VPS with 2Γ NVIDIA RTX 4090 GPUs (48GB VRAM), on a self-generated dataset of 193,841 instructionβreasoningβanswer triples (astragpt-reasoning-dataset), giving it native <think>...</think> chain-of-thought support.
"Most people fine-tune models. We built the whole pipeline β tokenizer, training loop, and all."
For the coding-specialized sibling, see [AstraGPTCoder-7B](https://huggingface.co/tantra-ai-labs/AstraGPTCoder-7B).
ποΈ Architecture
Decoder-only transformer, LLaMA-family design (Qwen2-compatible layout):
π¬ Training & Fine-Tuning
π€ Reasoning Support
Native <think> chain-of-thought:
Input: What is 15 * 47?
Output:
<think>
15 Γ 47 = 15 Γ 40 + 15 Γ 7 = 600 + 105 = 705
</think>
705Trigger explicitly by appending "<think>\n" after the chat template.
β‘ Quick Start
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
model_id = "tantra-ai-labs/AstraGPT-7B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id, torch_dtype=torch.float16, device_map="auto"
)
messages = [
{"role": "system", "content": "You are AstraGPT, a helpful AI by Tantra AI Labs. Think with <think>...</think> before answering."},
{"role": "user", "content": "Explain quantum tunneling simply."},
]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True) + "<think>\n"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
out = model.generate(**inputs, max_new_tokens=1024, temperature=0.3,
do_sample=True, repetition_penalty=1.1,
pad_token_id=tokenizer.eos_token_id)
print(tokenizer.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))4-bit quantized (~6GB VRAM):
from transformers import BitsAndBytesConfig
bnb = BitsAndBytesConfig(load_in_4bit=True, bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype=torch.float16, bnb_4bit_use_double_quant=True)
model = AutoModelForCausalLM.from_pretrained(model_id, quantization_config=bnb, device_map="auto")β οΈ Limitations
- 7B scale β complex multi-step math and long-horizon reasoning may fail
- Can produce confident but incorrect answers β verify critical outputs
- English-primary performance
<think>reasoning works best with an explicit<think>\nprompt prefix
π± Environmental Impact
- Hardware: 2Γ RTX 4090 (48GB), private bare-metal VPS
- Training duration: ~3β4 hours
- Estimated emissions: ~2β3 kgCOβeq
π Related Resources
- π¦ Datasets: astragpt-reasoning-dataset (193,841 triples) Β· high-reasoning-dataset-v1 (2,139 Q&A)
- π» Code sibling: AstraGPTCoder-7B
- π GitHub: github.com/codewith-aditya Β· Tantra AI Labs
- π Portfolio: codwith-aditya.pages.dev
- π Production serving: Astra AI Gateway β 40+ models, HTTP/2 streaming
π Citation
@misc{astragpt7b2026,
author = {Aditya Wakharkar},
title = {AstraGPT-7B: A 7B LLM with Custom Tokenizer and Chain-of-Thought Reasoning},
year = {2026},
publisher = {HuggingFace},
organization = {Tantra AI Labs},
url = {https://huggingface.co/tantra-ai-labs/AstraGPT-7B},
note = {Custom BPE tokenizer, GQA 28Q/4KV, RoPE, SwiGLU, LoRA reasoning fine-tune on 2Γ RTX 4090}
}<div align="center"> <em>Built with β€οΈ by <strong>Tantra AI Labs</strong></em><br/> <em>Every layer. Every weight. Every token.</em> </div>
