Viinzouz commited on
Commit
4b929d1
·
verified ·
1 Parent(s): 6dcaa7a

Adding ONNX file of this model

Browse files

Beep boop I am the [ONNX export bot 🤖🏎️](https://huggingface.co/spaces/onnx/export). On behalf of [Viinzouz](https://huggingface.co/Viinzouz), I would like to add to this repository the model converted to ONNX.

What is ONNX? It stands for "Open Neural Network Exchange", and is the most commonly used open standard for machine learning interoperability. You can find out more at [onnx.ai](https://onnx.ai/)!

The exported ONNX model can be then be consumed by various backends as TensorRT or TVM, or simply be used in a few lines with 🤗 Optimum through ONNX Runtime, check out how [here](https://huggingface.co/docs/optimum/main/en/onnxruntime/usage_guides/models)!

README.md CHANGED
@@ -1,6 +1,8 @@
1
  ---
2
  language: en
3
  license: mit
 
 
4
  ---
5
 
6
  # GPT-2 Medium
 
1
  ---
2
  language: en
3
  license: mit
4
+ tags:
5
+ - onnx
6
  ---
7
 
8
  # GPT-2 Medium
onnx/config.json CHANGED
@@ -1,5 +1,5 @@
1
  {
2
- "_name_or_path": "gpt2-medium",
3
  "activation_function": "gelu_new",
4
  "architectures": [
5
  "GPT2LMHeadModel"
@@ -34,7 +34,8 @@
34
  "max_length": 50
35
  }
36
  },
37
- "transformers_version": "4.30.2",
 
38
  "use_cache": true,
39
  "vocab_size": 50257
40
  }
 
1
  {
2
+ "_attn_implementation_autoset": true,
3
  "activation_function": "gelu_new",
4
  "architectures": [
5
  "GPT2LMHeadModel"
 
34
  "max_length": 50
35
  }
36
  },
37
+ "torch_dtype": "float32",
38
+ "transformers_version": "4.51.3",
39
  "use_cache": true,
40
  "vocab_size": 50257
41
  }
onnx/generation_config.json CHANGED
@@ -2,5 +2,5 @@
2
  "_from_model_config": true,
3
  "bos_token_id": 50256,
4
  "eos_token_id": 50256,
5
- "transformers_version": "4.30.2"
6
  }
 
2
  "_from_model_config": true,
3
  "bos_token_id": 50256,
4
  "eos_token_id": 50256,
5
+ "transformers_version": "4.51.3"
6
  }
onnx/model.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8821773ce660466f98b9611209fe6857660688aeabd9bf115dfb8991ec705362
3
+ size 1626003448
onnx/tokenizer.json CHANGED
The diff for this file is too large to render. See raw diff
 
onnx/tokenizer_config.json CHANGED
@@ -1,8 +1,19 @@
1
  {
2
  "add_prefix_space": false,
 
 
 
 
 
 
 
 
 
 
3
  "bos_token": "<|endoftext|>",
4
- "clean_up_tokenization_spaces": true,
5
  "eos_token": "<|endoftext|>",
 
6
  "model_max_length": 1024,
7
  "tokenizer_class": "GPT2Tokenizer",
8
  "unk_token": "<|endoftext|>"
 
1
  {
2
  "add_prefix_space": false,
3
+ "added_tokens_decoder": {
4
+ "50256": {
5
+ "content": "<|endoftext|>",
6
+ "lstrip": false,
7
+ "normalized": true,
8
+ "rstrip": false,
9
+ "single_word": false,
10
+ "special": true
11
+ }
12
+ },
13
  "bos_token": "<|endoftext|>",
14
+ "clean_up_tokenization_spaces": false,
15
  "eos_token": "<|endoftext|>",
16
+ "extra_special_tokens": {},
17
  "model_max_length": 1024,
18
  "tokenizer_class": "GPT2Tokenizer",
19
  "unk_token": "<|endoftext|>"