tiiuae / falcon-mamba-7b-pre-decay

huggingface.co
Total runs: 198
24-hour runs: 5
7-day runs: 86
30-day runs: 87
Model's Last Updated: October 10 2024

Introduction of falcon-mamba-7b-pre-decay

Model Details of falcon-mamba-7b-pre-decay

drawing

Table of Contents

  1. TL;DR
  2. Model Details
  3. Usage
  4. Training Details
  5. Evaluation

Falcon Mamba 7B - pre-decay checkpoint for continuous pretraining.

TL;DR

Model Details

Model Description
  • Developed by: https://www.tii.ae
  • Model type: Causal decoder-only
  • Architecture: Mamba
  • Language(s) (NLP): Mainly English
  • License: TII Falcon-Mamba License 2.0

Usage

Find below some example scripts on how to use the model in transformers (Make sure to have the latest transformers, or the one built from source):

Using the Pytorch model
Running the model on a CPU
Click to expand
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("tiiuae/falcon-mamba-7b-pre-decay")
model = AutoModelForCausalLM.from_pretrained("tiiuae/falcon-mamba-7b-pre-decay")

input_text = "Question: How many hours in one day? Answer: "
input_ids = tokenizer(input_text, return_tensors="pt").input_ids

outputs = model.generate(input_ids)
print(tokenizer.decode(outputs[0]))
Running the model on a GPU
Click to expand
# pip install accelerate
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("tiiuae/falcon-mamba-7b-pre-decay")
model = AutoModelForCausalLM.from_pretrained("tiiuae/falcon-mamba-7b-pre-decay", device_map="auto")

input_text = "Question: How many hours in one day? Answer: "
input_ids = tokenizer(input_text, return_tensors="pt").input_ids.to("cuda")

outputs = model.generate(input_ids)
print(tokenizer.decode(outputs[0]))
Running the model on a GPU using torch.compile
Click to expand
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("tiiuae/falcon-mamba-7b-pre-decay")
model = AutoModelForCausalLM.from_pretrained("tiiuae/falcon-mamba-7b-pre-decay", torch_dtype=torch.bfloat16).to(0)

model = torch.compile(model)

input_text = "Question: How many hours in one day? Answer: "
input_ids = tokenizer(input_text, return_tensors="pt").input_ids.to("cuda")

outputs = model.generate(input_ids)
print(tokenizer.decode(outputs[0]))
Running the model on a GPU using different precisions
FP16
Click to expand
# pip install accelerate
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("tiiuae/falcon-mamba-7b-pre-decay")
model = AutoModelForCausalLM.from_pretrained("tiiuae/falcon-mamba-7b-pre-decay", device_map="auto", torch_dtype=torch.float16)

input_text = "Question: How many hours in one day? Answer: "
input_ids = tokenizer(input_text, return_tensors="pt").input_ids.to("cuda")

outputs = model.generate(input_ids)
print(tokenizer.decode(outputs[0]))
4-bit
Click to expand
# pip install bitsandbytes accelerate
from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig

tokenizer = AutoTokenizer.from_pretrained("tiiuae/falcon-mamba-7b-pre-decay")
model = AutoModelForCausalLM.from_pretrained("tiiuae/falcon-mamba-7b-pre-decay", device_map="auto", quantization_config=BitsAndBytesConfig(load_in_4bit=True))

input_text = "Question: How many hours in one day? Answer: "
input_ids = tokenizer(input_text, return_tensors="pt").input_ids.to("cuda")

outputs = model.generate(input_ids)
print(tokenizer.decode(outputs[0]))

Training Details

Training Data

Falcon-Mamba has been trained with ~ 5,500 GT mainly coming from Refined-Web , a large volume web-only dataset filtered and deduplicated. Similar to the others Falcon suite models, Falcon-Mamba has been trained leveraging a multi-stage training strategy to increase the context-length from 2,048 to 8,192. Moreover, inspired by the concept of Curriculum Learning, we carefully selected data mixtures throughout the training stages, considering both data diversity and complexity. Note that at inference the context-length is not relevant as the Mamba architecture has no limit on long range dependency. At the last training stage, small portion of high-quality curated data was used to further enhance performance.

Overall, the data sources included RefinedWeb-English, high quality technical data, code data and math data extracted from public sources. In particular, we used samples coming from Fineweb-edu during our last training stage.

The data was tokenized with the Falcon- 7B / 11B tokenizer.

Training Procedure

Falcon-Mamba-7B was trained on 256 H100 80GB GPUs for the majority of the training, using a 3D parallelism strategy (TP=1, PP=1, DP=256) combined with ZeRO.

Training Hyperparameters
Hyperparameter Value Comment
Precision bfloat16
Optimizer AdamW
Max learning rate 6.4e-4 Following a WSD (warmup-stable-decay) learning rate schedule
Weight decay 1e-1
Batch size 2048

The model was trained AdamW optimizer, WSD (warmup-stable-decay) learning rate schedule, and a batch size rampup from b m i n = 128 b_{\mathrm{min}}=128 to b m a x = 2048 b_{\mathrm{max}}=2048 during first 50 GT of training. In the stable phase we used maximal learning rate η m a x = 6.4 × 1 0 − 4 \eta_{\mathrm{max}}=6.4 \times 10^{-4} , and decayed it to the minimal value η m i n = η m a x 256 \eta_{\mathrm{min}}=\frac{\eta_{\mathrm{max}}}{256} with exponential schedule over 500 GT. Also, we applied BatchScaling during the rampup — rescaling learning rate η \eta so that the Adam noise temperature T n o i s e ≡ η b T_{\mathrm{noise}}\equiv\frac{\eta}{\sqrt{b}} is kept constant.

Speeds, Sizes, Times

The model training took roughly two months.


Evaluation

Throughput

This model can achieve comparable throughput and performance compared to other transformer based models that use optimized kernels such as Flash Attention 2. Make sure to install the optimized Mamba kernels with the following commands:

pip install "causal-conv1d>=1.4.0" mamba-ssm

Refer to our FalconMamba blogpost for more details about performance evaluation.


Technical Specifications

Model Architecture and Objective

Falcon-Mamba-7B is a causal decoder-only model trained on a causal language modeling task (i.e., predict the next token).

The model is based on the Mamba architecture ( Gu et al., 2023 ).

Hyperparameter Value Comment
Layers 64 Number of layers
d_model 4096 Hidden dimension
d_state 16 The SSM state dimension
Vocabulary 65024 Vocabulary Size
Sequence length 8192 During the last training stages
Compute Infrastructure
Hardware

Falcon-Mamba-7B was trained on AWS SageMaker, using on average 256 H100 80GB GPUs in 32 p5 instances.

Software

Falcon-Mamba-7B was trained on an internal distributed training codebase, Gigatron. It uses a 3D parallelism approach combined with ZeRO, high-performance Triton kernels.


Citation

Paper coming soon 😊. In the meanwhile, you can use the following information to cite:

@article{falconmamba,
  title={Falcon Mamba: The First Competitive Attention-free 7B Language Model},
  author={Zuo, Jingwei and Velikanov, Maksim and Rhaiem, Dhia Eddine and Chahed, Ilyas and Belkada, Younes and Kunsch, Guillaume and Hacid, Hakim},
  year={2024}
}

Runs of tiiuae falcon-mamba-7b-pre-decay on huggingface.co

198
Total runs
5
24-hour runs
4
3-day runs
86
7-day runs
87
30-day runs

More Information About falcon-mamba-7b-pre-decay huggingface.co Model

More falcon-mamba-7b-pre-decay license Visit here:

https://choosealicense.com/licenses/falcon-mamba-7b-license

falcon-mamba-7b-pre-decay huggingface.co

falcon-mamba-7b-pre-decay huggingface.co is an AI model on huggingface.co that provides falcon-mamba-7b-pre-decay's model effect (), which can be used instantly with this tiiuae falcon-mamba-7b-pre-decay model. huggingface.co supports a free trial of the falcon-mamba-7b-pre-decay model, and also provides paid use of the falcon-mamba-7b-pre-decay. Support call falcon-mamba-7b-pre-decay model through api, including Node.js, Python, http.

falcon-mamba-7b-pre-decay huggingface.co Url

https://huggingface.co/tiiuae/falcon-mamba-7b-pre-decay

tiiuae falcon-mamba-7b-pre-decay online free

falcon-mamba-7b-pre-decay huggingface.co is an online trial and call api platform, which integrates falcon-mamba-7b-pre-decay's modeling effects, including api services, and provides a free online trial of falcon-mamba-7b-pre-decay, you can try falcon-mamba-7b-pre-decay online for free by clicking the link below.

tiiuae falcon-mamba-7b-pre-decay online free url in huggingface.co:

https://huggingface.co/tiiuae/falcon-mamba-7b-pre-decay

falcon-mamba-7b-pre-decay install

falcon-mamba-7b-pre-decay is an open source model from GitHub that offers a free installation service, and any user can find falcon-mamba-7b-pre-decay on GitHub to install. At the same time, huggingface.co provides the effect of falcon-mamba-7b-pre-decay install, users can directly use falcon-mamba-7b-pre-decay installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

falcon-mamba-7b-pre-decay install url in huggingface.co:

https://huggingface.co/tiiuae/falcon-mamba-7b-pre-decay

Url of falcon-mamba-7b-pre-decay

falcon-mamba-7b-pre-decay huggingface.co Url

Provider of falcon-mamba-7b-pre-decay huggingface.co

tiiuae
ORGANIZATIONS

Other API from tiiuae

huggingface.co

Total runs: 312.0K
Run Growth: -31.2K
Growth Rate: -9.87%
Updated:October 12 2024
huggingface.co

Total runs: 44.6K
Run Growth: -125.2K
Growth Rate: -280.36%
Updated:December 17 2024
huggingface.co

Total runs: 7.3K
Run Growth: -412
Growth Rate: -5.63%
Updated:July 13 2023
huggingface.co

Total runs: 6.8K
Run Growth: -1.2K
Growth Rate: -17.64%
Updated:August 09 2024
huggingface.co

Total runs: 5.5K
Run Growth: 950
Growth Rate: 17.21%
Updated:September 12 2026
huggingface.co

Total runs: 4.5K
Run Growth: -222
Growth Rate: -4.88%
Updated:December 17 2024
huggingface.co

Total runs: 2.4K
Run Growth: 2.4K
Growth Rate: 100.00%
Updated:December 24 2025
huggingface.co

Total runs: 1.5K
Run Growth: -255
Growth Rate: -16.73%
Updated:January 21 2026
huggingface.co

Total runs: 870
Run Growth: 511
Growth Rate: 57.09%
Updated:November 07 2024
huggingface.co

Total runs: 44
Run Growth: 44
Growth Rate: 100.00%
Updated:March 12 2026