Upload model
Browse files- config.json +6 -1
- modeling_mamba.py +6 -3
config.json
CHANGED
@@ -1,6 +1,10 @@
|
|
1 |
{
|
|
|
|
|
|
|
2 |
"auto_map": {
|
3 |
-
"AutoConfig": "configuration_mamba.MambaConfig"
|
|
|
4 |
},
|
5 |
"bias": false,
|
6 |
"conv_bias": true,
|
@@ -14,6 +18,7 @@
|
|
14 |
"model_type": "mamba",
|
15 |
"n_layer": 24,
|
16 |
"pad_vocab_size_multiple": 8,
|
|
|
17 |
"transformers_version": "4.37.2",
|
18 |
"vocab_size": 50280
|
19 |
}
|
|
|
1 |
{
|
2 |
+
"architectures": [
|
3 |
+
"MambaModelForCausalLM"
|
4 |
+
],
|
5 |
"auto_map": {
|
6 |
+
"AutoConfig": "configuration_mamba.MambaConfig",
|
7 |
+
"AutoModelForCausalLM": "modeling_mamba.MambaModelForCausalLM"
|
8 |
},
|
9 |
"bias": false,
|
10 |
"conv_bias": true,
|
|
|
18 |
"model_type": "mamba",
|
19 |
"n_layer": 24,
|
20 |
"pad_vocab_size_multiple": 8,
|
21 |
+
"torch_dtype": "float32",
|
22 |
"transformers_version": "4.37.2",
|
23 |
"vocab_size": 50280
|
24 |
}
|
modeling_mamba.py
CHANGED
@@ -434,9 +434,12 @@ class MambaModelForCausalLM(MambaPreTrainedModel):
|
|
434 |
loss=loss,
|
435 |
)
|
436 |
|
437 |
-
def prepare_inputs_for_generation(
|
438 |
-
|
439 |
-
|
|
|
|
|
|
|
440 |
|
441 |
|
442 |
class MambaModelForSequenceClassification(MambaPreTrainedModel):
|
|
|
434 |
loss=loss,
|
435 |
)
|
436 |
|
437 |
+
def prepare_inputs_for_generation(
|
438 |
+
self, input_ids, attention_mask=None, **model_kwargs
|
439 |
+
):
|
440 |
+
return {
|
441 |
+
"input_ids": input_ids,
|
442 |
+
}
|
443 |
|
444 |
|
445 |
class MambaModelForSequenceClassification(MambaPreTrainedModel):
|