BerenMillidge commited on
Commit
47fb219
1 Parent(s): 5813888

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +18 -24
README.md CHANGED
@@ -1,23 +1,11 @@
1
  ---
2
  license: apache-2.0
3
  ---
4
- # Model Card for Zamba2-2.7B-instruct
5
 
6
- Zamba2-2.7B-instruct is obtained from Zamba2-2.7B by fine-tuning on instruction-following and chat datasets.
7
 
8
- Zamba2-2.7B is a hybrid model composed of state-space and transformer blocks. It broadly follows the [Zamba architecture](https://arxiv.org/abs/2405.16712) which consists of a Mamba backbone alternating with shared transformer blocks (see diagram in [Model Details](#model-details)). Zamba2-2.7B possesses three major improvements over Zamba1:
9
-
10
- 1.) Mamba1 blocks have been replaced with Mamba2 blocks.
11
-
12
- 2.) Instead of a single shared attention block, we utilize two shared attention blocks which are interleaved in an ABAB pattern throughout the network.
13
-
14
- 3.) We apply a LoRA projector to each shared MLP block, which allows the network to specialize the MLPs at each invocation of the shared layer across depth. LoRA enables us to add depth-specialization for only a minimal increase in total parameter count.
15
-
16
- Zamba2-2.7B uses the Mistral v0.1 tokenizer and was pre-trained on 3T tokens of text and code data sourced from open web-datasets, including [Zyda](https://arxiv.org/abs/2406.01981). Subsequently, in a second phase, Zamba2-2.7B was annealed on a mixture of 100B high-quality tokens.
17
-
18
- Note: this is a temporary HuggingFace implementation of Zamba2-2.7B. It may not yet be fully compatible with all frameworks and tools intended to interface with HuggingFace models.
19
-
20
- A standalone Pytorch implementation of Zamba2-2.7B may be found [here](https://github.com/Zyphra/Zamba2).
21
 
22
  ## Quick start
23
 
@@ -58,14 +46,6 @@ outputs = model.generate(**input_ids, max_new_tokens=150, return_dict_in_generat
58
  print((tokenizer.decode(outputs[0])))
59
  ```
60
 
61
- ## Model Details
62
-
63
- Zamba2-2.7B utilizes and extends our original Zamba hybrid SSM-attention architecture. The core Zamba architecture consists of a backbone of Mamba layers interleaved with one or more shared attention layers (one shared attention in Zamba1, two in Zamba2). This attention has shared weights to minimize the parameter cost of the model. We find that concatenating the original model embeddings to the input to this attention block improves performance, likely due to better maintenance of information across depth. The Zamba2 architecture also applies LoRA projection matrices to the shared MLP to gain some additional expressivity in each block and allow each shared block to specialize slightly to its own unique position while keeping the additional parameter overhead small.
64
-
65
- <center>
66
- <img src="https://cdn-uploads.huggingface.co/production/uploads/65c05e75c084467acab2f84a/XrEIEBxd0fqIgh3LyArAV.png" width="300" alt="Zamba architecture">
67
- </center>
68
-
69
 
70
  ## Performance
71
 
@@ -87,4 +67,18 @@ Time to First Token (TTFT) | Output Generation
87
 
88
  <center>
89
  <img src="https://cdn-uploads.huggingface.co/production/uploads/65bc13717c6ad1994b6619e9/nhoss41xlzfEBZzcQXI6z.png" width="700" alt="Zamba inference and memory cost">
90
- </center>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
  ---
4
+ # Model Card for Zamba2-2.7B-Instruct
5
 
6
+ Zamba2-2.7B-Instruct is obtained from [Zamba2-2.7B](https://huggingface.co/Zyphra/Zamba2-2.7B) by fine-tuning on instruction-following and chat datasets.
7
 
8
+ Zamba2-2.7B-Instruct is a hybrid model composed of state-space and transformer blocks. It is based on the [Zamba2-2.7B](https://huggingface.co/Zyphra/Zamba2-2.7B) architecture.
 
 
 
 
 
 
 
 
 
 
 
 
9
 
10
  ## Quick start
11
 
 
46
  print((tokenizer.decode(outputs[0])))
47
  ```
48
 
 
 
 
 
 
 
 
 
49
 
50
  ## Performance
51
 
 
67
 
68
  <center>
69
  <img src="https://cdn-uploads.huggingface.co/production/uploads/65bc13717c6ad1994b6619e9/nhoss41xlzfEBZzcQXI6z.png" width="700" alt="Zamba inference and memory cost">
70
+ </center>
71
+
72
+ ## Model Details
73
+
74
+ Zamba2-2.7B-Instruct utilizes and extends our original Zamba hybrid SSM-attention architecture. The core Zamba architecture consists of a backbone of Mamba layers interleaved with one or more shared attention layers (one shared attention in Zamba1, two in Zamba2). This attention has shared weights to minimize the parameter cost of the model. We find that concatenating the original model embeddings to the input to this attention block improves performance, likely due to better maintenance of information across depth. The Zamba2 architecture also applies LoRA projection matrices to the shared MLP to gain some additional expressivity in each block and allow each shared block to specialize slightly to its own unique position while keeping the additional parameter overhead small.
75
+
76
+ <center>
77
+ <img src="https://cdn-uploads.huggingface.co/production/uploads/65c05e75c084467acab2f84a/XrEIEBxd0fqIgh3LyArAV.png" width="300" alt="Zamba architecture">
78
+ </center>
79
+
80
+
81
+
82
+ Note: this is a temporary HuggingFace implementation of Zamba2-2.7B. It may not yet be fully compatible with all frameworks and tools intended to interface with HuggingFace models.
83
+
84
+ A standalone Pytorch implementation of Zamba2-2.7B may be found [here](https://github.com/Zyphra/Zamba2).