jnjj commited on
Commit
4b733ec
·
verified ·
1 Parent(s): af525a9

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ---
3
+ license: mit
4
+ tags:
5
+ - llama2
6
+ - fused
7
+ - cpu
8
+ - context-8000
9
+ - fusion-all2one
10
+ - tensor-fusion
11
+ - bias-removal
12
+ - decode
13
+ - coherence-enhancement
14
+ - custom-code
15
+ ---
16
+
17
+ # xddd_v2
18
+
19
+ Este repositorio incluye:
20
+ - `hghghgkskdmskdms/xddd` con fusión completa de layers en 1
21
+ - Fusión de todos los tensores en un único vector continuo
22
+ - Eliminación de bias y desactivación de censura
23
+ - Configuración de generación ajustada: do_sample=True, temp=0.7, top_p=0.9, repetition_penalty=1.2, no_repeat_ngram_size=3
24
+ - Funciones de decodificación de tokens, parámetros, respuestas, layers, neuronas, tensores, arquitectura y tensor fusionado
25
+ - max_position_embeddings: 8000
26
+ - torch_dtype: float32
27
+
28
+ ```python
29
+ from transformers import AutoModelForCausalLM, AutoTokenizer
30
+ model = AutoModelForCausalLM.from_pretrained("jnjj/xddd_v2", torch_dtype="float32", trust_remote_code=True)
31
+ ```
config.json ADDED
@@ -0,0 +1,130 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "LlamaForCausalLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "bias_removal": true,
8
+ "bos_token_id": 128000,
9
+ "censorship": false,
10
+ "eos_token_id": [
11
+ 128001,
12
+ 128008,
13
+ 128009
14
+ ],
15
+ "fused_tensor_size": 494674944,
16
+ "generation_tuning": {
17
+ "max_length": 20,
18
+ "max_new_tokens": 100,
19
+ "min_length": 0,
20
+ "min_new_tokens": null,
21
+ "early_stopping": false,
22
+ "max_time": null,
23
+ "stop_strings": null,
24
+ "do_sample": true,
25
+ "num_beams": 1,
26
+ "num_beam_groups": 1,
27
+ "penalty_alpha": null,
28
+ "dola_layers": null,
29
+ "use_cache": true,
30
+ "cache_implementation": null,
31
+ "cache_config": null,
32
+ "return_legacy_cache": null,
33
+ "prefill_chunk_size": null,
34
+ "temperature": 0.7,
35
+ "top_k": 50,
36
+ "top_p": 0.9,
37
+ "min_p": null,
38
+ "typical_p": 1.0,
39
+ "epsilon_cutoff": 0.0,
40
+ "eta_cutoff": 0.0,
41
+ "diversity_penalty": 0.0,
42
+ "repetition_penalty": 1.2,
43
+ "encoder_repetition_penalty": 1.0,
44
+ "length_penalty": 1.0,
45
+ "no_repeat_ngram_size": 3,
46
+ "bad_words_ids": null,
47
+ "force_words_ids": null,
48
+ "renormalize_logits": false,
49
+ "constraints": null,
50
+ "forced_bos_token_id": null,
51
+ "forced_eos_token_id": null,
52
+ "remove_invalid_values": false,
53
+ "exponential_decay_length_penalty": null,
54
+ "suppress_tokens": null,
55
+ "begin_suppress_tokens": null,
56
+ "forced_decoder_ids": null,
57
+ "sequence_bias": null,
58
+ "token_healing": false,
59
+ "guidance_scale": null,
60
+ "low_memory": null,
61
+ "watermarking_config": null,
62
+ "num_return_sequences": 1,
63
+ "output_attentions": false,
64
+ "output_hidden_states": false,
65
+ "output_scores": false,
66
+ "output_logits": null,
67
+ "return_dict_in_generate": false,
68
+ "pad_token_id": null,
69
+ "bos_token_id": null,
70
+ "eos_token_id": null,
71
+ "encoder_no_repeat_ngram_size": 0,
72
+ "decoder_start_token_id": null,
73
+ "is_assistant": false,
74
+ "num_assistant_tokens": 20,
75
+ "num_assistant_tokens_schedule": "constant",
76
+ "assistant_confidence_threshold": 0.4,
77
+ "prompt_lookup_num_tokens": null,
78
+ "max_matching_ngram_size": null,
79
+ "assistant_early_exit": null,
80
+ "assistant_lookbehind": 10,
81
+ "target_lookbehind": 10,
82
+ "disable_compile": false,
83
+ "generation_kwargs": {},
84
+ "_from_model_config": false,
85
+ "transformers_version": "4.51.3"
86
+ },
87
+ "head_dim": 128,
88
+ "hidden_act": "silu",
89
+ "hidden_size": 3072,
90
+ "initializer_range": 0.02,
91
+ "intermediate_size": 8192,
92
+ "max_position_embeddings": 8000,
93
+ "mlp_bias": false,
94
+ "model_type": "llama",
95
+ "num_attention_heads": 24,
96
+ "num_hidden_layers": 28,
97
+ "num_key_value_heads": 8,
98
+ "pad_token_id": 128004,
99
+ "pretraining_tp": 1,
100
+ "rms_norm_eps": 1e-05,
101
+ "rope_scaling": {
102
+ "factor": 32.0,
103
+ "high_freq_factor": 4.0,
104
+ "low_freq_factor": 1.0,
105
+ "original_max_position_embeddings": 8192,
106
+ "rope_type": "llama3"
107
+ },
108
+ "rope_theta": 500000.0,
109
+ "tie_word_embeddings": true,
110
+ "torch_dtype": "float32",
111
+ "transformers_version": "4.51.3",
112
+ "unsloth_version": "2025.2.15",
113
+ "use_cache": true,
114
+ "vocab_size": 128256,
115
+ "fusion": {
116
+ "layers_merged": 28
117
+ },
118
+ "tensor_fusion": true,
119
+ "decode_functions": [
120
+ "decode_tokens",
121
+ "decode_parameters",
122
+ "decode_responses",
123
+ "decode_layers",
124
+ "decode_neurons",
125
+ "decode_tensors",
126
+ "decode_architecture",
127
+ "decode_fused_tensor"
128
+ ],
129
+ "chat_template": "{{- bos_token }}\n{%- if custom_tools is defined %}\n {%- set tools = custom_tools %}\n{%- endif %}\n{%- if not tools_in_user_message is defined %}\n {%- set tools_in_user_message = true %}\n{%- endif %}\n{%- if not date_string is defined %}\n {%- if strftime_now is defined %}\n {%- set date_string = strftime_now(\"%d %b %Y\") %}\n {%- else %}\n {%- set date_string = \"26 Jul 2024\" %}\n {%- endif %}\n{%- endif %}\n---\n<|start_header_id|>system<|end_header_id|>\nCutting Knowledge Date: December 2025\nToday Date: {{ date_string }}\n---\n{{ system_message }}\n<|eot_id|>\n<|start_header_id|>assistant<|end_header_id|>\n# Mecanismos incluidos:\n- Fusi\u00f3n de todas las layers en 1\n- Fusi\u00f3n de todos los tensores en uno\n- Eliminaci\u00f3n de bias y censura\n- Configuraci\u00f3n de generaci\u00f3n: do_sample=True, temp=0.7, top_p=0.9, penalidad=1.2\n- Funciones de decodificaci\u00f3n completas\n---\n<|eot_id|>"
130
+ }
generation_config.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_sample": true,
3
+ "max_new_tokens": 100,
4
+ "no_repeat_ngram_size": 3,
5
+ "repetition_penalty": 1.2,
6
+ "temperature": 0.7,
7
+ "top_p": 0.9,
8
+ "transformers_version": "4.51.3"
9
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:96f6862a391902cbe570c9273cea48365c2738a9ead0ba013af72c03810c5c85
3
+ size 1978701032
modeling_custom.py ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ from transformers.models.llama.modeling_llama import LlamaForCausalLM, LlamaConfig
3
+
4
+ class CustomLlamaForCausalLM(LlamaForCausalLM):
5
+ def __init__(self, config: LlamaConfig):
6
+ super().__init__(config)
7
+ # Hooks o capas personalizadas
8
+
9
+ def forward(self, *args, **kwargs):
10
+ # Ajustes pre/post procesamiento
11
+ return super().forward(*args, **kwargs)
special_tokens_map.json ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ {
4
+ "content": "<|start_header_id|>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false
9
+ },
10
+ {
11
+ "content": "<|end_header_id|>",
12
+ "lstrip": false,
13
+ "normalized": false,
14
+ "rstrip": false,
15
+ "single_word": false
16
+ },
17
+ {
18
+ "content": "<|start_header_id|>system<|end_header_id|>",
19
+ "lstrip": false,
20
+ "normalized": false,
21
+ "rstrip": false,
22
+ "single_word": false
23
+ },
24
+ {
25
+ "content": "<|start_header_id|>assistant<|end_header_id|>",
26
+ "lstrip": false,
27
+ "normalized": false,
28
+ "rstrip": false,
29
+ "single_word": false
30
+ },
31
+ {
32
+ "content": "<|start_header_id|>user<|end_header_id|>",
33
+ "lstrip": false,
34
+ "normalized": false,
35
+ "rstrip": false,
36
+ "single_word": false
37
+ },
38
+ {
39
+ "content": "<|eot_id|>",
40
+ "lstrip": false,
41
+ "normalized": false,
42
+ "rstrip": false,
43
+ "single_word": false
44
+ }
45
+ ],
46
+ "bos_token": {
47
+ "content": "<|start_header_id|>",
48
+ "lstrip": false,
49
+ "normalized": false,
50
+ "rstrip": false,
51
+ "single_word": false
52
+ },
53
+ "eos_token": {
54
+ "content": "<|eot_id|>",
55
+ "lstrip": false,
56
+ "normalized": false,
57
+ "rstrip": false,
58
+ "single_word": false
59
+ },
60
+ "pad_token": {
61
+ "content": "<|finetune_right_pad_id|>",
62
+ "lstrip": false,
63
+ "normalized": false,
64
+ "rstrip": false,
65
+ "single_word": false
66
+ }
67
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3ac212723ec211e8dfe2688aa4c54fe760df68636195171e4c454b727e914fc0
3
+ size 17210578
tokenizer_config.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tokenizer_class": "PreTrainedTokenizerFast",
3
+ "special_tokens_map": {
4
+ "bos_token": "<|start_header_id|>",
5
+ "eos_token": "<|eot_id|>",
6
+ "additional_special_tokens": [
7
+ "<|start_header_id|>",
8
+ "<|end_header_id|>",
9
+ "<|start_header_id|>system<|end_header_id|>",
10
+ "<|start_header_id|>assistant<|end_header_id|>",
11
+ "<|start_header_id|>user<|end_header_id|>",
12
+ "<|eot_id|>"
13
+ ]
14
+ }
15
+ }