Text Generation
Transformers
PyTorch
hypermamba
feature-extraction
ssm
mamba
meta-learning
few-shot
experimental
custom_code
Instructions to use hoanghai2110/HyperMambaLM-300M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hoanghai2110/HyperMambaLM-300M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="hoanghai2110/HyperMambaLM-300M", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("hoanghai2110/HyperMambaLM-300M", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use hoanghai2110/HyperMambaLM-300M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "hoanghai2110/HyperMambaLM-300M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hoanghai2110/HyperMambaLM-300M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/hoanghai2110/HyperMambaLM-300M
- SGLang
How to use hoanghai2110/HyperMambaLM-300M 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 "hoanghai2110/HyperMambaLM-300M" \ --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": "hoanghai2110/HyperMambaLM-300M", "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 "hoanghai2110/HyperMambaLM-300M" \ --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": "hoanghai2110/HyperMambaLM-300M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use hoanghai2110/HyperMambaLM-300M with Docker Model Runner:
docker model run hf.co/hoanghai2110/HyperMambaLM-300M
|
Download README.md from hoanghai2110/HyperMambaLM-300M: direct link, hf CLI and curl.
- Browser
- Download file 2.53 kB
-
https://huggingface.co/hoanghai2110/HyperMambaLM-300M/resolve/main/README.md
- Command line
-
hf download hf://hoanghai2110/HyperMambaLM-300M/README.md
-
curl -L -o README.md https://huggingface.co/hoanghai2110/HyperMambaLM-300M/resolve/main/README.md
2.53 kB
metadata
tags:
- ssm
- mamba
- meta-learning
- few-shot
- pytorch
- experimental
license: mit
library_name: transformers
pipeline_tag: text-generation
model_type: ssm
HyperMambaLM-300M
⚠️ This is an architecture-only repository – no pretrained weights are available yet.
HyperMambaLM is a research prototype combining modern state-space modeling with meta-learning components.
Inspired by Mamba, but extended with additional mechanisms for few-shot adaptation, neuro-symbolic reasoning, and progressive learning.
🧠 Highlights
- 🌀 Mamba-style SSM: Parallel scan for efficient sequence modeling
- 🧬 Meta-Learning (MAML): Learns to adapt with few examples
- 🧠 Neuro-Symbolic Layer: Combines neural networks with logic reasoning
- 🌱 Progressive & Continual Learning: Learns without forgetting
- 💡 Adaptive Precision: Smart compute control
- 🧩 Built for: NAS, federated learning, knowledge distillation...
📂 Files included
| File | Description |
|---|---|
config.json |
Model hyperparameters |
modeling_hypermamba.py |
Core model definition |
modeling_utils.py |
(Optional) Utility components |
demo.py |
Quick usage test |
__init__.py |
Python module loader |
README.md |
This file |
🚀 Quickstart (Colab / Local)
📌 This model is not yet trained, so only the architecture is available.
# Step 1: Download model code (if not cloned)
!wget https://huggingface.co/hoanghai2110/HyperMambaLM-300M/resolve/main/modeling_hypermamba.py
# Step 2: Import and initialize
from modeling_hypermamba import HyperMambaLM, HyperMambaConfig
config = HyperMambaConfig.from_pretrained("hoanghai2110/HyperMambaLM-300M")
model = HyperMambaLM(config)
# Step 3: Run a dummy forward pass
import torch
input_ids = torch.randint(0, config.vocab_size, (1, 16))
output = model(input_ids)
print("✅ Output shape:", output.logits.shape) # [1, 16, vocab_size]