-
Notifications
You must be signed in to change notification settings - Fork 12.4k
llama: add initial support for Falcon-H1 model family #14534
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 106 commits
991de6c
f897efd
71a6848
03568c9
0c93ef6
fdd5cff
14c37ec
8bea922
071f4b7
50eadc7
a39a842
1415cd8
243e4d1
cce3549
22de62c
2fe057c
d22b4ea
6c7d9e2
15138df
a6d0067
1fd0574
250b4f1
3ee7983
2aa48dd
9760c8b
7a25441
280dd2d
c56ec07
c4af0f3
53304c8
441d8d6
6c39e77
8c50893
49d7420
97011d7
286e1fa
b3bc1fb
a9f3a63
e96cc73
3afb2a8
0ad3502
53446f7
ae937f4
b6df0a4
935d46f
624699c
042e5ff
f74e266
632861e
084873c
fd20330
68cb784
d2f46f1
7d7da0b
67b2664
da8a338
e63ee46
d473d42
8555ee8
7846c67
2dee7cf
a846d02
f028a43
d41f111
f266d14
4bc9e0c
2834a4a
823696b
adff470
097df0e
9a048d8
52d1ef3
58e3866
d28c31a
9b92648
7fe1794
40058c0
debf4e5
212edff
90ddf24
7edf380
c3c5d51
f8d7c97
4610ee2
082ab4a
c5515e3
1ef53b3
d5efbd0
a5afc8b
99f9a3d
c3c64c3
63e3afc
d758578
8972c15
7897c21
6403caa
710630a
7b9aa7b
ecc5253
bbca33e
9f514e3
34c5d83
521e823
6943f4e
4d2c94b
b7c9a99
9fd308d
51f50bf
367d8c5
1fa361b
6dde986
94ab3a8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,6 +46,7 @@ static const std::map<llm_arch, const char *> LLM_ARCH_NAMES = { | |
{ LLM_ARCH_STARCODER2, "starcoder2" }, | ||
{ LLM_ARCH_MAMBA, "mamba" }, | ||
{ LLM_ARCH_MAMBA2, "mamba2" }, | ||
{ LLM_ARCH_FALCON_H1, "falcon-h1" }, | ||
{ LLM_ARCH_XVERSE, "xverse" }, | ||
{ LLM_ARCH_COMMAND_R, "command-r" }, | ||
{ LLM_ARCH_COHERE2, "cohere2" }, | ||
|
@@ -1024,6 +1025,30 @@ static const std::map<llm_arch, std::map<llm_tensor, const char *>> LLM_TENSOR_N | |
{ LLM_TENSOR_SSM_OUT, "blk.%d.ssm_out" }, | ||
}, | ||
}, | ||
{ | ||
LLM_ARCH_FALCON_H1, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. One thing I've noticed while working through merge conflicts with GR4: it looks like the Falcon H1 entries in the various model architecture lists are inconsistent in their order (next to |
||
{ | ||
{ LLM_TENSOR_TOKEN_EMBD, "token_embd" }, | ||
{ LLM_TENSOR_OUTPUT, "output" }, | ||
{ LLM_TENSOR_OUTPUT_NORM, "output_norm" }, | ||
{ LLM_TENSOR_ATTN_NORM, "blk.%d.attn_norm" }, | ||
{ LLM_TENSOR_ATTN_Q, "blk.%d.attn_q" }, | ||
{ LLM_TENSOR_ATTN_K, "blk.%d.attn_k" }, | ||
{ LLM_TENSOR_ATTN_V, "blk.%d.attn_v" }, | ||
{ LLM_TENSOR_ATTN_OUT, "blk.%d.attn_output" }, | ||
{ LLM_TENSOR_SSM_IN, "blk.%d.ssm_in" }, | ||
{ LLM_TENSOR_SSM_CONV1D, "blk.%d.ssm_conv1d" }, | ||
{ LLM_TENSOR_SSM_DT, "blk.%d.ssm_dt" }, | ||
{ LLM_TENSOR_SSM_A, "blk.%d.ssm_a" }, | ||
{ LLM_TENSOR_SSM_D, "blk.%d.ssm_d" }, | ||
{ LLM_TENSOR_SSM_NORM, "blk.%d.ssm_norm" }, | ||
{ LLM_TENSOR_SSM_OUT, "blk.%d.ssm_out" }, | ||
{ LLM_TENSOR_FFN_NORM, "blk.%d.ffn_norm" }, | ||
{ LLM_TENSOR_FFN_GATE, "blk.%d.ffn_gate" }, | ||
{ LLM_TENSOR_FFN_DOWN, "blk.%d.ffn_down" }, | ||
{ LLM_TENSOR_FFN_UP, "blk.%d.ffn_up" }, | ||
}, | ||
}, | ||
{ | ||
LLM_ARCH_XVERSE, | ||
{ | ||
|
@@ -1967,9 +1992,10 @@ bool llm_arch_is_recurrent(const llm_arch & arch) { | |
} | ||
|
||
bool llm_arch_is_hybrid(const llm_arch & arch) { | ||
// TODO: There are currently no hybrid models! Once there are, this will be | ||
// the place to identify them | ||
// List all mamba-attention hybrid models here | ||
switch (arch) { | ||
case LLM_ARCH_FALCON_H1: | ||
return true; | ||
default: | ||
return false; | ||
} | ||
|
Uh oh!
There was an error while loading. Please reload this page.