Downloads · 30 days
0
oguzatas/mamba-tr-project-mamba
mamba-tr-project-mamba is a text generation model from oguzatas. Use it when you need the model to write or continue text. The card lists the license as mit.
This model demonstrates the efficiency of State Space Models (SSM) on morphologically rich languages. It is a Mamba architecture (~115M parameters) trained from scratch on Turkish Wikipedia, achieving ~2x faster infer…
Downloads · 30 days
0
Access
Public
Updated Dec 3, 2025
Repo size
921 MB
Likes
0
Public
Click a slice to open those files.
.bin460 MB · 99%
From the Hugging Face model README
This model demonstrates the efficiency of State Space Models (SSM) on morphologically rich languages. It is a Mamba architecture (~115M parameters) trained from scratch on Turkish Wikipedia, achieving ~2x faster inference speed compared to a Transformer baseline of equivalent size.
| Model Architecture | Throughput (tok/s) | Latency (ms) | Peak VRAM (MB) | Final Loss (500 Steps) |
|---|---|---|---|---|
| Transformer (GPT-2) | 67.53 | 14.81 | ~1786 | 6.81 |
| Mamba (Ours) | 131.09 | 7.63 | ~2469* | 20.58 |
Model,Throughput (tok/s),Latency (ms/token),Final Loss (500 Steps) Transformer (Baseline),67.53,14.81,6.81 Mamba (SSM),131.09,7.63,20.58
> Note: VRAM usage for Mamba includes CUDA Graph overhead for maximum throughput.
mamba-ssm)import torch
from mamba_ssm.models.mixer_seq_simple import MambaLMHeadModel
from transformers import PreTrainedTokenizerFast
# 1. Load Tokenizer
tokenizer = PreTrainedTokenizerFast.from_pretrained("oguzatas/mamba-tr-project-tokenizer")
# 2. Load Mamba Model (Manual load required for custom arch)
model = MambaLMHeadModel.from_pretrained("oguzatas/mamba-tr-project-mamba", dtype=torch.float32, device="cuda")
# 3. Generate
text = "Yapay zeka teknolojileri"
input_ids = tokenizer.encode(text, return_tensors="pt").to("cuda")
output = model.generate(input_ids, max_length=50, cg=True) # cg=True enables CUDA Graphs
print(tokenizer.decode(output[0]))