Instructions to use hmellor/tiny-random-BambaForCausalLM with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hmellor/tiny-random-BambaForCausalLM with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="hmellor/tiny-random-BambaForCausalLM")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("hmellor/tiny-random-BambaForCausalLM") model = AutoModelForCausalLM.from_pretrained("hmellor/tiny-random-BambaForCausalLM") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use hmellor/tiny-random-BambaForCausalLM with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "hmellor/tiny-random-BambaForCausalLM" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hmellor/tiny-random-BambaForCausalLM", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/hmellor/tiny-random-BambaForCausalLM
- SGLang
How to use hmellor/tiny-random-BambaForCausalLM 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 "hmellor/tiny-random-BambaForCausalLM" \ --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": "hmellor/tiny-random-BambaForCausalLM", "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 "hmellor/tiny-random-BambaForCausalLM" \ --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": "hmellor/tiny-random-BambaForCausalLM", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use hmellor/tiny-random-BambaForCausalLM with Docker Model Runner:
docker model run hf.co/hmellor/tiny-random-BambaForCausalLM
Upload BambaForCausalLM
Browse files- config.json +2 -2
- model.safetensors +3 -0
config.json
CHANGED
|
@@ -17,7 +17,7 @@
|
|
| 17 |
"mamba_chunk_size": 256,
|
| 18 |
"mamba_conv_bias": true,
|
| 19 |
"mamba_d_conv": 4,
|
| 20 |
-
"mamba_d_head":
|
| 21 |
"mamba_d_state": 8,
|
| 22 |
"mamba_dt_rank": 256,
|
| 23 |
"mamba_expand": 4,
|
|
@@ -37,7 +37,7 @@
|
|
| 37 |
"rope_scaling": null,
|
| 38 |
"rope_theta": 10000.0,
|
| 39 |
"tie_word_embeddings": false,
|
| 40 |
-
"torch_dtype": "
|
| 41 |
"transformers_version": "4.51.3",
|
| 42 |
"use_cache": true,
|
| 43 |
"use_mamba_kernels": true,
|
|
|
|
| 17 |
"mamba_chunk_size": 256,
|
| 18 |
"mamba_conv_bias": true,
|
| 19 |
"mamba_d_conv": 4,
|
| 20 |
+
"mamba_d_head": 32,
|
| 21 |
"mamba_d_state": 8,
|
| 22 |
"mamba_dt_rank": 256,
|
| 23 |
"mamba_expand": 4,
|
|
|
|
| 37 |
"rope_scaling": null,
|
| 38 |
"rope_theta": 10000.0,
|
| 39 |
"tie_word_embeddings": false,
|
| 40 |
+
"torch_dtype": "bfloat16",
|
| 41 |
"transformers_version": "4.51.3",
|
| 42 |
"use_cache": true,
|
| 43 |
"use_mamba_kernels": true,
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f050db2d01ca759c9b99b314eaaae34ed41945b205efb1a2f66f488d83b7f617
|
| 3 |
+
size 32990648
|