Instructions to use hanzla/Falcon3-Mamba-R1-v0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hanzla/Falcon3-Mamba-R1-v0 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="hanzla/Falcon3-Mamba-R1-v0") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("hanzla/Falcon3-Mamba-R1-v0") model = AutoModelForCausalLM.from_pretrained("hanzla/Falcon3-Mamba-R1-v0", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use hanzla/Falcon3-Mamba-R1-v0 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "hanzla/Falcon3-Mamba-R1-v0" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hanzla/Falcon3-Mamba-R1-v0", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/hanzla/Falcon3-Mamba-R1-v0
- SGLang
How to use hanzla/Falcon3-Mamba-R1-v0 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 "hanzla/Falcon3-Mamba-R1-v0" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hanzla/Falcon3-Mamba-R1-v0", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "hanzla/Falcon3-Mamba-R1-v0" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hanzla/Falcon3-Mamba-R1-v0", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use hanzla/Falcon3-Mamba-R1-v0 with Docker Model Runner:
docker model run hf.co/hanzla/Falcon3-Mamba-R1-v0
Upload FalconMambaForCausalLM
Browse files- config.json +3 -3
- generation_config.json +1 -1
- model-00001-of-00003.safetensors +2 -2
- model-00002-of-00003.safetensors +2 -2
- model-00003-of-00003.safetensors +2 -2
config.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
{
|
| 2 |
-
"_name_or_path": "
|
| 3 |
"architectures": [
|
| 4 |
"FalconMambaForCausalLM"
|
| 5 |
],
|
|
@@ -26,8 +26,8 @@
|
|
| 26 |
"time_step_min": 0.001,
|
| 27 |
"time_step_rank": 256,
|
| 28 |
"time_step_scale": 1.0,
|
| 29 |
-
"torch_dtype": "
|
| 30 |
-
"transformers_version": "4.
|
| 31 |
"use_bias": false,
|
| 32 |
"use_cache": true,
|
| 33 |
"use_conv_bias": true,
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "hanzla/Falcon3-Mamba-R1-v0-dev1",
|
| 3 |
"architectures": [
|
| 4 |
"FalconMambaForCausalLM"
|
| 5 |
],
|
|
|
|
| 26 |
"time_step_min": 0.001,
|
| 27 |
"time_step_rank": 256,
|
| 28 |
"time_step_scale": 1.0,
|
| 29 |
+
"torch_dtype": "bfloat16",
|
| 30 |
+
"transformers_version": "4.49.0",
|
| 31 |
"use_bias": false,
|
| 32 |
"use_cache": true,
|
| 33 |
"use_conv_bias": true,
|
generation_config.json
CHANGED
|
@@ -6,5 +6,5 @@
|
|
| 6 |
11
|
| 7 |
],
|
| 8 |
"pad_token_id": 0,
|
| 9 |
-
"transformers_version": "4.
|
| 10 |
}
|
|
|
|
| 6 |
11
|
| 7 |
],
|
| 8 |
"pad_token_id": 0,
|
| 9 |
+
"transformers_version": "4.49.0"
|
| 10 |
}
|
model-00001-of-00003.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ccf7f591cd2562495078d90421e2a89f011a2fa11a0ef541b44356ae528e02be
|
| 3 |
+
size 4961951048
|
model-00002-of-00003.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b45c8386348040a27431d8f0f0c6ea9bdee0b99adcdacd1fa559e143892f11ea
|
| 3 |
+
size 4993566096
|
model-00003-of-00003.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8e58e41de7d2170852e21ce2ffc00862cf08154accb881515e500fa7bc6548fa
|
| 3 |
+
size 4606661504
|