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
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,6 +1,12 @@
|
|
| 1 |
---
|
| 2 |
library_name: transformers
|
| 3 |
-
tags:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
---
|
| 5 |
|
| 6 |
# Model Card for Model ID
|
|
@@ -13,17 +19,14 @@ tags: []
|
|
| 13 |
|
| 14 |
### Model Description
|
| 15 |
|
| 16 |
-
|
| 17 |
|
| 18 |
-
|
| 19 |
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
- **
|
| 23 |
-
- **Model type:**
|
| 24 |
-
- **Language(s) (NLP):** [More Information Needed]
|
| 25 |
-
- **License:** [More Information Needed]
|
| 26 |
-
- **Finetuned from model [optional]:** [More Information Needed]
|
| 27 |
|
| 28 |
### Model Sources [optional]
|
| 29 |
|
|
|
|
| 1 |
---
|
| 2 |
library_name: transformers
|
| 3 |
+
tags:
|
| 4 |
+
- mamba
|
| 5 |
+
- falcon3
|
| 6 |
+
- reasoning
|
| 7 |
+
base_model:
|
| 8 |
+
- tiiuae/Falcon3-Mamba-7B-Instruct
|
| 9 |
+
pipeline_tag: text-generation
|
| 10 |
---
|
| 11 |
|
| 12 |
# Model Card for Model ID
|
|
|
|
| 19 |
|
| 20 |
### Model Description
|
| 21 |
|
| 22 |
+
This model is a fine tuned version of Falcon3 Mamba 7 billion instruct.
|
| 23 |
|
| 24 |
+
It is tailored to reason and build logic before answering to the user question. The Mamba based model scales linearly with increased number of tokens, making it a very fast reasoner while maintaining consistent response quality.
|
| 25 |
|
| 26 |
+
This is from an earlier checkpoint of the model training.
|
| 27 |
+
|
| 28 |
+
- **Developed by:** Hanzla Javaid
|
| 29 |
+
- **Model type:** Mamba
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
### Model Sources [optional]
|
| 32 |
|