mrs83 commited on
Commit
652aabe
·
verified ·
1 Parent(s): 62ed3bf

Upload 5 files

Browse files
chat_template.jinja ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {%- if messages[0]['role'] == 'system' %}
2
+ {%- set system_message = messages[0]['content'] %}
3
+ {%- else %}
4
+ {%- set system_message = 'You are Echo-DSRN, created by ethicalabs.ai. You are a helpful assistant.' %}
5
+ {%- endif %}
6
+
7
+ {%- if tools %}
8
+ {{- '<|system|>\n' + system_message }}
9
+ {{- "\n\n# Tools\n\nYou are a precise routing agent. You have access to the following tools. If a tool is required, output EXACTLY the tool call format. If no tool is required, respond conversationally.\n\nAvailable tools:\n<tools>" }}
10
+ {%- for tool in tools %}
11
+ {{- "\n" + tool | tojson }}
12
+ {%- endfor %}
13
+ {{- "\n</tools><|end|>\n" }}
14
+ {%- else %}
15
+ {{- '<|system|>\n' + system_message + '<|end|>\n' }}
16
+ {%- endif %}
17
+
18
+ {%- for message in messages %}
19
+ {%- if (message['role'] == "user") or (message['role'] == "system" and not loop.first) or (message['role'] == "assistant" and not message['tool_calls']) %}
20
+ {{- '<|' + message['role'] + '|>\n' + message['content'] + '<|end|>\n' }}
21
+ {%- elif message['role'] == "assistant" %}
22
+ {{- '<|assistant|>\n' }}
23
+ {%- if message['content'] %}
24
+ {{- message['content'] }}
25
+ {%- endif %}
26
+ {%- if message['tool_calls'] %}
27
+ {%- for tool_call in message['tool_calls'] %}
28
+ {%- if tool_call['function'] is defined %}
29
+ {%- set tool_call = tool_call['function'] %}
30
+ {%- endif %}
31
+ {{- '\n<tool_call>\n{"name": "' + tool_call['name'] + '", "arguments": ' + tool_call['arguments'] | tojson + '}\n</tool_call>' }}
32
+ {%- endfor %}
33
+ {%- endif %}
34
+ {{- '<|end|>\n' }}
35
+ {%- elif message['role'] == "tool" %}
36
+ {%- if loop.first or messages[loop.index0 - 1]['role'] != "tool" %}
37
+ {{- '<|user|>\n' }}
38
+ {%- endif %}
39
+ {{- '<tool_response>\n' + message['content'] + '\n</tool_response>' }}
40
+ {%- if loop.last or messages[loop.index0 + 1]['role'] != "tool" %}
41
+ {{- '<|end|>\n' }}
42
+ {%- endif %}
43
+ {%- endif %}
44
+ {%- endfor %}
45
+
46
+ {%- if add_generation_prompt %}
47
+ {{- '<|assistant|>\n' }}
48
+ {%- else %}
49
+ {{- eos_token }}
50
+ {%- endif %}
config.json ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "EchoForSequenceClassification"
4
+ ],
5
+ "auto_map": {
6
+ "AutoConfig": "configuration_echo.EchoConfig",
7
+ "AutoModel": "modeling_echo.EchoModel",
8
+ "AutoModelForCausalLM": "modeling_echo.EchoForCausalLM",
9
+ "AutoModelForSequenceClassification": "modeling_echo.EchoForSequenceClassification"
10
+ },
11
+ "bos_token_id": 1,
12
+ "classifier_dropout": 0.0,
13
+ "dtype": "bfloat16",
14
+ "embed_dim": 512,
15
+ "eos_token_id": 32000,
16
+ "gate_bias_init": 0.0,
17
+ "hf_model_name": "ethicalabs/Echo-DSRN-Tiny-Base",
18
+ "hidden_size": 512,
19
+ "id2label": {
20
+ "0": "Methodology",
21
+ "1": "Dataset",
22
+ "2": "Review",
23
+ "3": "Applied",
24
+ "4": "Theoretical"
25
+ },
26
+ "label2id": {
27
+ "Applied": 3,
28
+ "Dataset": 1,
29
+ "Methodology": 0,
30
+ "Review": 2,
31
+ "Theoretical": 4
32
+ },
33
+ "max_position_embeddings": 2048,
34
+ "mlp_bias": false,
35
+ "mlp_ratio": 8.0,
36
+ "model_type": "echo",
37
+ "num_attention_heads": 4,
38
+ "num_heads": 4,
39
+ "num_hidden_layers": 8,
40
+ "num_layers": 8,
41
+ "pad_token_id": 32000,
42
+ "rope_theta": 10000.0,
43
+ "surprise_lambda_init": 0.1,
44
+ "system_prompt": "You are a helpful multilingual intent classification assistant.",
45
+ "tie_word_embeddings": false,
46
+ "transformers_version": "5.2.0",
47
+ "use_cache": false,
48
+ "use_hybrid_attention": true,
49
+ "use_rmsnorm": true,
50
+ "use_triton": true,
51
+ "user_template": "Classify the intent of the following request: {text}",
52
+ "vocab_size": 32017
53
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9b330a7f4194adb9e0cb319cef1631216ff482a71a3bd9a6c2e3d93b1686f8fb
3
+ size 196547882
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "backend": "tokenizers",
3
+ "bos_token": "<s>",
4
+ "clean_up_tokenization_spaces": false,
5
+ "eos_token": "<|endoftext|>",
6
+ "extra_special_tokens": [
7
+ "<tool_call>",
8
+ "</tool_call>",
9
+ "<tool_response>",
10
+ "</tool_response>",
11
+ "<tools>",
12
+ "</tools>"
13
+ ],
14
+ "fix_mistral_regex": true,
15
+ "is_local": false,
16
+ "legacy": false,
17
+ "model_max_length": 131072,
18
+ "pad_token": "<|endoftext|>",
19
+ "padding_side": "right",
20
+ "sp_model_kwargs": {},
21
+ "tokenizer_class": "TokenizersBackend",
22
+ "unk_token": "<unk>",
23
+ "use_default_system_prompt": false
24
+ }