Upload 7 files
Browse files- config.json +1 -0
- enigma_module.py +3 -1
- generation_config.json +6 -0
- model.safetensors +1 -1
config.json
CHANGED
|
@@ -4,6 +4,7 @@
|
|
| 4 |
],
|
| 5 |
"auto_map": {
|
| 6 |
"AutoConfig": "enigma_module.EnigmaConfig",
|
|
|
|
| 7 |
"AutoModelForCausalLM": "enigma_module.EnigmaForCausalLM"
|
| 8 |
},
|
| 9 |
"dtype": "float32",
|
|
|
|
| 4 |
],
|
| 5 |
"auto_map": {
|
| 6 |
"AutoConfig": "enigma_module.EnigmaConfig",
|
| 7 |
+
"AutoModel": "enigma_module.EnigmaModel",
|
| 8 |
"AutoModelForCausalLM": "enigma_module.EnigmaForCausalLM"
|
| 9 |
},
|
| 10 |
"dtype": "float32",
|
enigma_module.py
CHANGED
|
@@ -24,7 +24,9 @@ class EnigmaModel(PreTrainedModel):
|
|
| 24 |
x = self.embedding(input_ids)
|
| 25 |
return self.linear(x)
|
| 26 |
|
| 27 |
-
|
|
|
|
|
|
|
| 28 |
config_class = EnigmaConfig
|
| 29 |
|
| 30 |
def __init__(self, config):
|
|
|
|
| 24 |
x = self.embedding(input_ids)
|
| 25 |
return self.linear(x)
|
| 26 |
|
| 27 |
+
from transformers.generation import GenerationMixin
|
| 28 |
+
|
| 29 |
+
class EnigmaForCausalLM(PreTrainedModel, GenerationMixin):
|
| 30 |
config_class = EnigmaConfig
|
| 31 |
|
| 32 |
def __init__(self, config):
|
generation_config.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"output_attentions": false,
|
| 4 |
+
"output_hidden_states": false,
|
| 5 |
+
"transformers_version": "5.8.0.dev0"
|
| 6 |
+
}
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 5186432
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c0170419c48ff0473d0b18658ce095a57d722882f151a0d7c689700aa20a1295
|
| 3 |
size 5186432
|