Text Generation
Transformers
Safetensors
English
suprabrain
gated-deltanet
linear-attention
sliding-window-attention
custom-architecture
custom_code
Instructions to use SupraLabs/SupraBrain-50M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SupraLabs/SupraBrain-50M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="SupraLabs/SupraBrain-50M", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("SupraLabs/SupraBrain-50M", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use SupraLabs/SupraBrain-50M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SupraLabs/SupraBrain-50M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SupraLabs/SupraBrain-50M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/SupraLabs/SupraBrain-50M
- SGLang
How to use SupraLabs/SupraBrain-50M 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 "SupraLabs/SupraBrain-50M" \ --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": "SupraLabs/SupraBrain-50M", "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 "SupraLabs/SupraBrain-50M" \ --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": "SupraLabs/SupraBrain-50M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use SupraLabs/SupraBrain-50M with Docker Model Runner:
docker model run hf.co/SupraLabs/SupraBrain-50M
| { | |
| "architectures": [ | |
| "SupraBrainForCausalLM" | |
| ], | |
| "attn_every": 4, | |
| "attn_head_dim": 64, | |
| "attn_num_heads": 6, | |
| "attn_num_kv_heads": 2, | |
| "attn_window": 256, | |
| "auto_map": { | |
| "AutoConfig": "modeling_suprabrain.SupraBrainConfig", | |
| "AutoModelForCausalLM": "modeling_suprabrain.SupraBrainForCausalLM" | |
| }, | |
| "bos_token_id": 0, | |
| "ce_chunk": 1024, | |
| "compile_blocks": true, | |
| "dtype": "float32", | |
| "emb_shortcut": true, | |
| "eos_token_id": 2, | |
| "full_attn_layers": [ | |
| 19 | |
| ], | |
| "gdn_conv_size": 4, | |
| "gdn_gate_rank": 32, | |
| "gdn_head_dim": 128, | |
| "gdn_num_heads": 3, | |
| "grad_ckpt": false, | |
| "hidden_size": 384, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 1152, | |
| "logit_softcap": 0.0, | |
| "max_position_embeddings": 1024, | |
| "mlp_act": "rational", | |
| "model_type": "suprabrain", | |
| "norm_eps": 1e-05, | |
| "num_hidden_layers": 28, | |
| "pad_token_id": 1, | |
| "rope_theta": 10000.0, | |
| "surprise": true, | |
| "surprise_win": 16, | |
| "tie_word_embeddings": true, | |
| "transformers_version": "5.8.1", | |
| "unembed_rank": 32, | |
| "use_cache": false, | |
| "value_residual": true, | |
| "vocab_size": 23808, | |
| "z_loss": 0.0001 | |
| } | |