Triangle104 commited on
Commit
54fe7de
1 Parent(s): a400a3a

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +2 -139
README.md CHANGED
@@ -1,5 +1,4 @@
1
  ---
2
- base_model: tiiuae/falcon-mamba-7b-instruct
3
  datasets:
4
  - tiiuae/falcon-refinedweb
5
  - HuggingFaceFW/fineweb-edu
@@ -8,154 +7,18 @@ language:
8
  license: other
9
  license_name: falcon-mamba-7b-license
10
  license_link: https://falconllm.tii.ae/falcon-mamba-7b-terms-and-conditions.html
 
11
  pipeline_tag: text-generation
 
12
  tags:
13
  - llama-cpp
14
  - gguf-my-repo
15
- inference: true
16
  ---
17
 
18
  # Triangle104/falcon-mamba-7b-instruct-Q4_K_M-GGUF
19
  This model was converted to GGUF format from [`tiiuae/falcon-mamba-7b-instruct`](https://huggingface.co/tiiuae/falcon-mamba-7b-instruct) using llama.cpp via the ggml.ai's [GGUF-my-repo](https://huggingface.co/spaces/ggml-org/gguf-my-repo) space.
20
  Refer to the [original model card](https://huggingface.co/tiiuae/falcon-mamba-7b-instruct) for more details on the model.
21
 
22
- ---
23
- Model Description
24
-
25
- Developed by: https://www.tii.ae
26
- Model type: Causal decoder-only
27
- Architecture: Mamba
28
- Language(s) (NLP): Mainly English
29
- License: TII Falcon-Mamba License 2.0
30
-
31
-
32
- Usage
33
-
34
- 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):
35
- Using the Pytorch model
36
- Running the model on a CPU
37
- Click to expand
38
-
39
- Running the model on a GPU
40
- Click to expand
41
-
42
- Running the model on a GPU using torch.compile
43
- Click to expand
44
-
45
- Running the model on a GPU using different precisions
46
- FP16
47
- Click to expand
48
-
49
- 4-bit
50
- Click to expand
51
-
52
-
53
- Training Details
54
- Training Data
55
-
56
- 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.
57
-
58
- 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.
59
-
60
- The data was tokenized with the Falcon-7B/11B tokenizer.
61
-
62
- After pre-training, the model has been further fine-tuned on instruction data.
63
- Training Procedure
64
-
65
- 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.
66
- Training Hyperparameters
67
- Hyperparameter Value Comment
68
- Precision bfloat16
69
- Optimizer AdamW
70
- Max learning rate 6.4e-4 Following a WSD (warmup-stable-decay) learning rate schedule
71
- Weight decay 1e-1
72
- Batch size 2048
73
-
74
- The model was trained AdamW optimizer, WSD (warmup-stable-decay) learning rate schedule, and a batch size rampup from bmin=128b_{\mathrm{min}}=128bmin​=128 to bmax=2048b_{\mathrm{max}}=2048bmax​=2048 during first 50 GT of training. In the stable phase we used maximal learning rate ηmax=6.4×10−4\eta_{\mathrm{max}}=6.4 \times 10^{-4}ηmax​=6.4×10−4, and decayed it to the minimal value ηmin=ηmax256\eta_{\mathrm{min}}=\frac{\eta_{\mathrm{max}}}{256}ηmin​=256ηmax​​ with exponential schedule over 500 GT. Also, we applied BatchScaling during the rampup — rescaling learning rate η\etaη so that the Adam noise temperature Tnoise≡ηbT_{\mathrm{noise}}\equiv\frac{\eta}{\sqrt{b}}Tnoise​≡b
75
-
76
- ​η​ is kept constant.
77
- Speeds, Sizes, Times
78
-
79
- The model training took roughly two months.
80
-
81
- Evaluation
82
- Benchmarks
83
-
84
- We evaluate our model on all benchmarks of the new leaderboard's version using the lm-evaluation-harness package, and then normalize the evaluation results with HuggingFace score normalization.
85
- model name IFEval BBH MATH LvL5 GPQA MUSR MMLU-PRO Average
86
- Pure SSM models
87
- FalconMamba-7B 33.36 19.88 3.63 8.05 10.86 14.47 15.04
88
- TRI-ML/mamba-7b-rw* 22.46 6.71 0.45 1.12 5.51 1.69 6.25
89
- Hybrid SSM-attention models
90
- recurrentgemma-9b 30.76 14.80 4.83 4.70 6.60 17.88 13.20
91
- Zyphra/Zamba-7B-v1* 24.06 21.12 3.32 3.03 7.74 16.02 12.55
92
- Transformer models
93
- Falcon2-11B 32.61 21.94 2.34 2.80 7.53 15.44 13.78
94
- Meta-Llama-3-8B 14.55 24.50 3.25 7.38 6.24 24.55 13.41
95
- Meta-Llama-3.1-8B 12.70 25.29 4.61 6.15 8.98 24.95 13.78
96
- Mistral-7B-v0.1 23.86 22.02 2.49 5.59 10.68 22.36 14.50
97
- Mistral-Nemo-Base-2407 (12B) 16.83 29.37 4.98 5.82 6.52 27.46 15.08
98
- gemma-7B 26.59 21.12 6.42 4.92 10.98 21.64 15.28
99
-
100
- Also, we evaluate our model on the benchmarks of the first leaderboard using lighteval.
101
- model name ARC HellaSwag MMLU Winogrande TruthfulQA GSM8K Average
102
- Pure SSM models
103
- FalconMamba-7B* 62.03 80.82 62.11 73.64 53.42 52.54 64.09
104
- TRI-ML/mamba-7b-rw* 51.25 80.85 33.41 71.11 32.08 4.70 45.52
105
- Hybrid SSM-attention models
106
- recurrentgemma-9b** 52.00 80.40 60.50 73.60 38.60 42.60 57.95
107
- Zyphra/Zamba-7B-v1* 56.14 82.23 58.11 79.87 52.88 30.78 60.00
108
- Transformer models
109
- Falcon2-11B 59.73 82.91 58.37 78.30 52.56 53.83 64.28
110
- Meta-Llama-3-8B 60.24 82.23 66.70 78.45 42.93 45.19 62.62
111
- Meta-Llama-3.1-8B 58.53 82.13 66.43 74.35 44.29 47.92 62.28
112
- Mistral-7B-v0.1 59.98 83.31 64.16 78.37 42.15 37.83 60.97
113
- gemma-7B 61.09 82.20 64.56 79.01 44.79 50.87 63.75
114
-
115
- Mostly, we took evaluation results from both leaderboards. For the models marked by star we evaluated the tasks internally, while for the models marked by two stars the results were taken from paper or model card.
116
- Throughput
117
-
118
- 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:
119
-
120
- pip install "causal-conv1d>=1.4.0" mamba-ssm
121
-
122
- Refer to our FalconMamba blogpost for more details about performance evaluation.
123
-
124
- Technical Specifications
125
- Model Architecture and Objective
126
-
127
- Falcon-Mamba-7B is a causal decoder-only model trained on a causal language modeling task (i.e., predict the next token).
128
-
129
- The model is based on the Mamba architecture (Gu et al., 2023).
130
- Hyperparameter Value Comment
131
- Layers 64 Number of layers
132
- d_model 4096 Hidden dimension
133
- d_state 16 The SSM state dimension
134
- Vocabulary 65024 Vocabulary Size
135
- Sequence length 8192 During the last training stages
136
- Compute Infrastructure
137
- Hardware
138
-
139
- Falcon-Mamba-7B was trained on AWS SageMaker, using on average 256 H100 80GB GPUs in 32 p5 instances.
140
- Software
141
-
142
- 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.
143
-
144
- Citation
145
-
146
- You can use the following bibtex citation:
147
-
148
- @misc{zuo2024falconmambacompetitiveattentionfree,
149
- title={Falcon Mamba: The First Competitive Attention-free 7B Language Model},
150
- author={Jingwei Zuo and Maksim Velikanov and Dhia Eddine Rhaiem and Ilyas Chahed and Younes Belkada and Guillaume Kunsch and Hakim Hacid},
151
- year={2024},
152
- eprint={2410.05355},
153
- archivePrefix={arXiv},
154
- primaryClass={cs.CL},
155
- url={https://arxiv.org/abs/2410.05355},
156
- }
157
-
158
- ---
159
  ## Use with llama.cpp
160
  Install llama.cpp through brew (works on Mac and Linux)
161
 
 
1
  ---
 
2
  datasets:
3
  - tiiuae/falcon-refinedweb
4
  - HuggingFaceFW/fineweb-edu
 
7
  license: other
8
  license_name: falcon-mamba-7b-license
9
  license_link: https://falconllm.tii.ae/falcon-mamba-7b-terms-and-conditions.html
10
+ base_model: tiiuae/falcon-mamba-7b-instruct
11
  pipeline_tag: text-generation
12
+ inference: true
13
  tags:
14
  - llama-cpp
15
  - gguf-my-repo
 
16
  ---
17
 
18
  # Triangle104/falcon-mamba-7b-instruct-Q4_K_M-GGUF
19
  This model was converted to GGUF format from [`tiiuae/falcon-mamba-7b-instruct`](https://huggingface.co/tiiuae/falcon-mamba-7b-instruct) using llama.cpp via the ggml.ai's [GGUF-my-repo](https://huggingface.co/spaces/ggml-org/gguf-my-repo) space.
20
  Refer to the [original model card](https://huggingface.co/tiiuae/falcon-mamba-7b-instruct) for more details on the model.
21
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  ## Use with llama.cpp
23
  Install llama.cpp through brew (works on Mac and Linux)
24