Clemylia commited on
Commit
21ae897
·
verified ·
1 Parent(s): cf35667

Upload folder using huggingface_hub

Browse files
README.md ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - autotrain
4
+ - text-generation-inference
5
+ - text-generation
6
+ library_name: transformers.js
7
+ base_model:
8
+ - LLM-CLEM/Charlotte-Test-aligne
9
+ widget:
10
+ - messages:
11
+ - role: user
12
+ content: What is your favorite condiment?
13
+ license: other
14
+ datasets:
15
+ - LLM-CLEM/Charlotte-alignement
16
+ pipeline_tag: text-generation
17
+ ---
18
+
19
+
20
+
21
+ # Charlotte-Test-aligne (ONNX)
22
+
23
+
24
+ This is an ONNX version of [LLM-CLEM/Charlotte-Test-aligne](https://huggingface.co/LLM-CLEM/Charlotte-Test-aligne). It was automatically converted and uploaded using [this Hugging Face Space](https://huggingface.co/spaces/onnx-community/convert-to-onnx).
25
+
26
+
27
+ ## Usage with Transformers.js
28
+
29
+
30
+ See the pipeline documentation for `text-generation`: https://huggingface.co/docs/transformers.js/api/pipelines#module_pipelines.TextGenerationPipeline
31
+
32
+
33
+ ---
34
+
35
+
36
+ # Model Trained Using AutoTrain
37
+
38
+ This model was trained using AutoTrain. For more information, please visit [AutoTrain](https://hf.co/docs/autotrain).
39
+
40
+ # Usage
41
+
42
+ ```python
43
+
44
+ from transformers import AutoModelForCausalLM, AutoTokenizer
45
+
46
+ model_path = "PATH_TO_THIS_REPO"
47
+
48
+ tokenizer = AutoTokenizer.from_pretrained(model_path)
49
+ model = AutoModelForCausalLM.from_pretrained(
50
+ model_path,
51
+ device_map="auto",
52
+ torch_dtype='auto'
53
+ ).eval()
54
+
55
+ # Prompt content: "hi"
56
+ messages = [
57
+ {"role": "user", "content": "hi"}
58
+ ]
59
+
60
+ input_ids = tokenizer.apply_chat_template(conversation=messages, tokenize=True, add_generation_prompt=True, return_tensors='pt')
61
+ output_ids = model.generate(input_ids.to('cuda'))
62
+ response = tokenizer.decode(output_ids[0][input_ids.shape[1]:], skip_special_tokens=True)
63
+
64
+ # Model response: "Hello! How can I assist you today?"
65
+ print(response)
66
+ ```
added_tokens.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "[PAD]": 50257
3
+ }
config.json ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_attn_implementation_autoset": true,
3
+ "_name_or_path": "LLM-CLEM/Charlotte-Test-aligne",
4
+ "activation_function": "gelu_new",
5
+ "architectures": [
6
+ "GPT2LMHeadModel"
7
+ ],
8
+ "attn_pdrop": 0.1,
9
+ "bos_token_id": 50256,
10
+ "dtype": "float32",
11
+ "embd_pdrop": 0.1,
12
+ "eos_token_id": 50256,
13
+ "initializer_range": 0.02,
14
+ "layer_norm_epsilon": 1e-05,
15
+ "model_type": "gpt2",
16
+ "n_embd": 512,
17
+ "n_head": 8,
18
+ "n_inner": null,
19
+ "n_layer": 8,
20
+ "n_positions": 128,
21
+ "pad_token_id": 50257,
22
+ "reorder_and_upcast_attn": false,
23
+ "resid_pdrop": 0.1,
24
+ "scale_attn_by_inverse_layer_idx": false,
25
+ "scale_attn_weights": true,
26
+ "summary_activation": null,
27
+ "summary_first_dropout": 0.1,
28
+ "summary_proj_to_labels": true,
29
+ "summary_type": "cls_index",
30
+ "summary_use_proj": true,
31
+ "torch_dtype": "float32",
32
+ "transformers_version": "4.49.0",
33
+ "use_cache": true,
34
+ "vocab_size": 50258
35
+ }
generation_config.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 50256,
4
+ "eos_token_id": [
5
+ 50256
6
+ ],
7
+ "pad_token_id": 50257,
8
+ "transformers_version": "4.49.0"
9
+ }
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
onnx/model.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:60dd22cdec8fc978403e33d23b0bbad3ce137d1947f04ecf8792f188ba55dd98
3
+ size 204300051
onnx/model_bnb4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ccdedf5c386df8790c921f6f809413bd22fadba8b40332d08e2c38fb90a26416
3
+ size 204300070
onnx/model_fp16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2066fe2df42692b86dd2963294f5d5f3903ad6d2c970a15fb9a31a3f271b35fc
3
+ size 102268734
onnx/model_int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:64668b9c359c42268ea642c712bff227a50ed48cb2d602e70ba599a5e16b685b
3
+ size 154386871
onnx/model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ccdedf5c386df8790c921f6f809413bd22fadba8b40332d08e2c38fb90a26416
3
+ size 204300070
onnx/model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b5a57067ea7aa487ba531353a5ed24baadeb9de218deb001682076f31683bf42
3
+ size 102268753
onnx/model_quantized.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:64668b9c359c42268ea642c712bff227a50ed48cb2d602e70ba599a5e16b685b
3
+ size 154386871
onnx/model_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:715354854382348a5be515b58c461303e5bd964c4ad72bc1ecee3b31750691c1
3
+ size 154386892
quantize_config.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "modes": [
3
+ "fp16",
4
+ "q8",
5
+ "int8",
6
+ "uint8",
7
+ "q4",
8
+ "q4f16",
9
+ "bnb4"
10
+ ],
11
+ "per_channel": false,
12
+ "reduce_range": false,
13
+ "block_size": null,
14
+ "is_symmetric": true,
15
+ "accuracy_level": null,
16
+ "quant_type": 1,
17
+ "op_block_list": null
18
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<|endoftext|>",
4
+ "lstrip": false,
5
+ "normalized": true,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "<|endoftext|>",
11
+ "lstrip": false,
12
+ "normalized": true,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "[PAD]",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "unk_token": {
24
+ "content": "<|endoftext|>",
25
+ "lstrip": false,
26
+ "normalized": true,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ }
30
+ }
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
+ "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
+ "50257": {
13
+ "content": "[PAD]",
14
+ "lstrip": false,
15
+ "normalized": false,
16
+ "rstrip": false,
17
+ "single_word": false,
18
+ "special": true
19
+ }
20
+ },
21
+ "bos_token": "<|endoftext|>",
22
+ "chat_template": "{%- for message in messages -%}\n {{ '### Instruction:\\n' + message.content + '\\n\\n' }}\n{%- endfor -%}\n{{ '### Response:\\n' }}",
23
+ "clean_up_tokenization_spaces": false,
24
+ "eos_token": "<|endoftext|>",
25
+ "extra_special_tokens": {},
26
+ "max_length": 128,
27
+ "model_max_length": 1024,
28
+ "pad_to_multiple_of": null,
29
+ "pad_token": "[PAD]",
30
+ "pad_token_type_id": 0,
31
+ "padding_side": "right",
32
+ "stride": 0,
33
+ "tokenizer_class": "GPT2Tokenizer",
34
+ "truncation_side": "right",
35
+ "truncation_strategy": "longest_first",
36
+ "unk_token": "<|endoftext|>"
37
+ }
vocab.json ADDED
The diff for this file is too large to render. See raw diff