Stefan171 commited on
Commit
108134b
1 Parent(s): a61f353

Delete tokenizer

Browse files
tokenizer/model.safetensors DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:da969d56fc3a8fcb72ae57f1484be0a65fc365b6374d98c2460c16a53dceda0a
3
- size 4400216504
 
 
 
 
tokenizer/save.py DELETED
@@ -1,20 +0,0 @@
1
- from transformers import AutoModelForCausalLM, AutoTokenizer
2
- import torch
3
- from safetensors.torch import save_file
4
-
5
- # Load your model and tokenizer
6
- model_name = "Stefan171/TinyLlama-QuantumQuill-chat-12-05-24"
7
- model = AutoModelForCausalLM.from_pretrained(model_name)
8
- tokenizer = AutoTokenizer.from_pretrained(model_name)
9
-
10
- # Define the path to save the safetensors model in the current directory
11
- safetensors_path = "./model.safetensors"
12
-
13
- # Convert model parameters to a dictionary
14
- state_dict = model.state_dict()
15
-
16
- # Save the model parameters in safetensors format
17
- save_file(state_dict, safetensors_path)
18
-
19
- # Save the tokenizer in the current directory
20
- tokenizer.save_pretrained("./")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tokenizer/special_tokens_map.json DELETED
@@ -1,30 +0,0 @@
1
- {
2
- "bos_token": {
3
- "content": "<s>",
4
- "lstrip": false,
5
- "normalized": false,
6
- "rstrip": false,
7
- "single_word": false
8
- },
9
- "eos_token": {
10
- "content": "</s>",
11
- "lstrip": false,
12
- "normalized": false,
13
- "rstrip": false,
14
- "single_word": false
15
- },
16
- "pad_token": {
17
- "content": "<unk>",
18
- "lstrip": false,
19
- "normalized": false,
20
- "rstrip": false,
21
- "single_word": false
22
- },
23
- "unk_token": {
24
- "content": "<unk>",
25
- "lstrip": false,
26
- "normalized": false,
27
- "rstrip": false,
28
- "single_word": false
29
- }
30
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tokenizer/tokenizer.json DELETED
The diff for this file is too large to render. See raw diff
 
tokenizer/tokenizer.model DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347
3
- size 499723
 
 
 
 
tokenizer/tokenizer_config.json DELETED
@@ -1,50 +0,0 @@
1
- {
2
- "add_bos_token": true,
3
- "add_eos_token": false,
4
- "added_tokens_decoder": {
5
- "0": {
6
- "content": "<unk>",
7
- "lstrip": false,
8
- "normalized": false,
9
- "rstrip": false,
10
- "single_word": false,
11
- "special": true
12
- },
13
- "1": {
14
- "content": "<s>",
15
- "lstrip": false,
16
- "normalized": false,
17
- "rstrip": false,
18
- "single_word": false,
19
- "special": true
20
- },
21
- "2": {
22
- "content": "</s>",
23
- "lstrip": false,
24
- "normalized": false,
25
- "rstrip": false,
26
- "single_word": false,
27
- "special": true
28
- }
29
- },
30
- "additional_special_tokens": [],
31
- "bos_token": "<s>",
32
- "chat_template": "{% for message in messages %}\n{% if message['role'] == 'user' %}\n{{ '<|user|>\n' + message['content'] + eos_token }}\n{% elif message['role'] == 'system' %}\n{{ '<|system|>\n' + message['content'] + eos_token }}\n{% elif message['role'] == 'assistant' %}\n{{ '<|assistant|>\n' + message['content'] + eos_token }}\n{% endif %}\n{% if loop.last and add_generation_prompt %}\n{{ '<|assistant|>' }}\n{% endif %}\n{% endfor %}",
33
- "clean_up_tokenization_spaces": false,
34
- "cls_token": null,
35
- "eos_token": "</s>",
36
- "mask_token": null,
37
- "model_input_names": [
38
- "input_ids",
39
- "attention_mask"
40
- ],
41
- "model_max_length": 16000,
42
- "pad_token": "<unk>",
43
- "padding_side": "left",
44
- "sep_token": null,
45
- "split_special_tokens": false,
46
- "tokenizer_class": "LlamaTokenizer",
47
- "truncation_side": "right",
48
- "unk_token": "<unk>",
49
- "use_default_system_prompt": false
50
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tokenizer/upload.py DELETED
@@ -1,26 +0,0 @@
1
- from huggingface_hub import HfApi
2
-
3
- api = HfApi()
4
- model_id = "Stefan171/TinyLlama-QuantumQuill-chat-12-05-24"
5
-
6
- # Path to the safetensors model file
7
- safetensors_path = "./model.safetensors"
8
-
9
- # Upload the safetensors model
10
- api.upload_file(
11
- path_or_fileobj=safetensors_path,
12
- path_in_repo="model.safetensors",
13
- repo_id=model_id,
14
- repo_type="model"
15
- )
16
-
17
- # Path to the tokenizer folder (current directory)
18
- tokenizer_path = "./"
19
-
20
- # Upload the tokenizer files
21
- api.upload_folder(
22
- folder_path=tokenizer_path,
23
- path_in_repo="tokenizer",
24
- repo_id=model_id,
25
- repo_type="model"
26
- )