Mxode commited on
Commit
f6abc3d
1 Parent(s): 7673309
README.md CHANGED
@@ -82,7 +82,7 @@ def translate(text: str, model, **kwargs):
82
  response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
83
  return response
84
 
85
- text = "I love to watch my favorite TV series."
86
 
87
  response = translate(text, model, max_new_tokens=64, do_sample=False)
88
  print(response)
@@ -111,7 +111,7 @@ model_path = "your/folder/to/onnx_model"
111
  ort_model = ORTModelForCausalLM.from_pretrained(model_path)
112
  tokenizer = AutoTokenizer.from_pretrained(model_path)
113
 
114
- text = "I love to watch my favorite TV series."
115
 
116
  response = translate(text, ort_model, max_new_tokens=64, do_sample=False)
117
  print(response)
@@ -125,7 +125,7 @@ from optimum.pipelines import pipeline
125
  model_path = "your/folder/to/onnx_model"
126
  pipe = pipeline("text-generation", model=model_path, accelerator="ort")
127
 
128
- text = "I love to watch my favorite TV series."
129
 
130
  response = pipe(text, max_new_tokens=64, do_sample=False)
131
  response
 
82
  response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
83
  return response
84
 
85
+ text = "Each step of the cell cycle is monitored by internal."
86
 
87
  response = translate(text, model, max_new_tokens=64, do_sample=False)
88
  print(response)
 
111
  ort_model = ORTModelForCausalLM.from_pretrained(model_path)
112
  tokenizer = AutoTokenizer.from_pretrained(model_path)
113
 
114
+ text = "Each step of the cell cycle is monitored by internal."
115
 
116
  response = translate(text, ort_model, max_new_tokens=64, do_sample=False)
117
  print(response)
 
125
  model_path = "your/folder/to/onnx_model"
126
  pipe = pipeline("text-generation", model=model_path, accelerator="ort")
127
 
128
+ text = "Each step of the cell cycle is monitored by internal."
129
 
130
  response = pipe(text, max_new_tokens=64, do_sample=False)
131
  response
README_zh-CN.md CHANGED
@@ -70,7 +70,7 @@ def translate(text: str, model, **kwargs):
70
  response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
71
  return response
72
 
73
- text = "I love to watch my favorite TV series."
74
 
75
  response = translate(text, model, max_new_tokens=64, do_sample=False)
76
  print(response)
@@ -99,7 +99,7 @@ model_path = "your/folder/to/onnx_model"
99
  ort_model = ORTModelForCausalLM.from_pretrained(model_path)
100
  tokenizer = AutoTokenizer.from_pretrained(model_path)
101
 
102
- text = "I love to watch my favorite TV series."
103
 
104
  response = translate(text, ort_model, max_new_tokens=64, do_sample=False)
105
  print(response)
@@ -113,7 +113,7 @@ from optimum.pipelines import pipeline
113
  model_path = "your/folder/to/onnx_model"
114
  pipe = pipeline("text-generation", model=model_path, accelerator="ort")
115
 
116
- text = "I love to watch my favorite TV series."
117
 
118
  response = pipe(text, max_new_tokens=64, do_sample=False)
119
  response
 
70
  response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
71
  return response
72
 
73
+ text = "Each step of the cell cycle is monitored by internal."
74
 
75
  response = translate(text, model, max_new_tokens=64, do_sample=False)
76
  print(response)
 
99
  ort_model = ORTModelForCausalLM.from_pretrained(model_path)
100
  tokenizer = AutoTokenizer.from_pretrained(model_path)
101
 
102
+ text = "Each step of the cell cycle is monitored by internal."
103
 
104
  response = translate(text, ort_model, max_new_tokens=64, do_sample=False)
105
  print(response)
 
113
  model_path = "your/folder/to/onnx_model"
114
  pipe = pipeline("text-generation", model=model_path, accelerator="ort")
115
 
116
+ text = "Each step of the cell cycle is monitored by internal."
117
 
118
  response = pipe(text, max_new_tokens=64, do_sample=False)
119
  response
config.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "LlamaForCausalLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 1,
8
+ "eos_token_id": 2,
9
+ "hidden_act": "silu",
10
+ "hidden_size": 1120,
11
+ "initializer_range": 0.02,
12
+ "intermediate_size": 3072,
13
+ "max_position_embeddings": 2048,
14
+ "mlp_bias": false,
15
+ "model_type": "llama",
16
+ "num_attention_heads": 16,
17
+ "num_hidden_layers": 6,
18
+ "num_key_value_heads": 8,
19
+ "pretraining_tp": 1,
20
+ "rms_norm_eps": 1e-06,
21
+ "rope_scaling": null,
22
+ "rope_theta": 10000.0,
23
+ "tie_word_embeddings": true,
24
+ "torch_dtype": "float32",
25
+ "transformers_version": "4.42.4",
26
+ "use_cache": true,
27
+ "vocab_size": 16000
28
+ }
generation_config.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 1,
4
+ "eos_token_id": 2,
5
+ "transformers_version": "4.42.4"
6
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e61e747d1807d95624209f67bdef6ae9941d53a311abc8fdfb48126a9903f2d7
3
+ size 409787400
special_tokens_map.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<|endoftext|>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "<|im_end|>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "<|endoftext|>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ }
23
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "<|endoftext|>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "1": {
12
+ "content": "<|im_start|>",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "2": {
20
+ "content": "<|im_end|>",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ }
27
+ },
28
+ "bos_token": "<|endoftext|>",
29
+ "chat_template": "{% for message in messages %}{% if loop.first and messages[0]['role'] != 'system' %}{{ '<|im_start|>system\nYou are a helpful assistant.<|im_end|>\n' }}{% endif %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}",
30
+ "clean_up_tokenization_spaces": false,
31
+ "eos_token": "<|im_end|>",
32
+ "errors": "replace",
33
+ "model_max_length": 4096,
34
+ "pad_token": "<|endoftext|>",
35
+ "split_special_tokens": false,
36
+ "tokenizer_class": "PreTrainedTokenizerFast"
37
+ }
trainer_state.json ADDED
The diff for this file is too large to render. See raw diff