Text Generation
Transformers
Safetensors
Korean
llama
conversational
Inference Endpoints
text-generation-inference
JeongwonChoi commited on
Commit
64685a1
1 Parent(s): a9a2313

Initial commit

Browse files
DataVortex.png ADDED
Logo.png ADDED
README.md ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - text-generation
4
+ license: cc-by-nc-sa-4.0
5
+ language:
6
+ - ko
7
+ base_model: TinyLlama/TinyLlama-1.1B-Chat-v1.0
8
+ pipeline_tag: text-generation
9
+ ---
10
+
11
+ # **DataVortexTL-1.1B-v0.1**
12
+ <img src="./DataVortex.png" alt="DataVortex" style="height: 8em;">
13
+
14
+ ## **License**
15
+
16
+ [cc-by-nc-sa-4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/)
17
+
18
+ ## **Model Details**
19
+
20
+ ### **Base Model**
21
+ [TinyLlama/TinyLlama-1.1B-Chat-v1.0](https://huggingface.co/TinyLlama/TinyLlama-1.1B-Chat-v1.0)
22
+
23
+ ### **Trained On**
24
+ H100 80GB 1ea
25
+
26
+ ### **Instruction format**
27
+
28
+ <!-- It follows **(No Input) Alpaca** format. -->
29
+
30
+ ## **Model Benchmark**
31
+
32
+ ### **Ko-LLM-Leaderboard**
33
+
34
+ On Benchmarking...
35
+
36
+ # **Implementation Code**
37
+
38
+ Since, chat_template already contains insturction format above.
39
+ You can use the code below.
40
+
41
+ ```python
42
+ from transformers import AutoModelForCausalLM, AutoTokenizer
43
+
44
+ device = "cuda"
45
+
46
+ model = AutoModelForCausalLM.from_pretrained("Edentns/DataVortexTL-1.1B-v0.1", device_map=device)
47
+ tokenizer = AutoTokenizer.from_pretrained("Edentns/DataVortexTL-1.1B-v0.1")
48
+
49
+ messages = [
50
+ { "role": "user", "content": "대한민국의 수도는 어디야?" }
51
+ ]
52
+
53
+ encoded = tokenizer.apply_chat_template(
54
+ messages,
55
+ add_generation_prompt=True,
56
+ return_tensors="pt",
57
+ return_token_type_ids=False
58
+ ).to(device)
59
+
60
+ decoded = model.generate(
61
+ input_ids=encoded,
62
+ temperature=0.2,
63
+ top_p=0.9,
64
+ repetition_penalty=1.2,
65
+ do_sample=True,
66
+ max_length=4096,
67
+ eos_token_id=tokenizer.eos_token_id,
68
+ pad_token_id=tokenizer.eos_token_id
69
+ )
70
+ decoded = decoded[0][encoded.shape[1]:decoded[0].shape[-1]]
71
+ decoded_text = tokenizer.decode(decoded, skip_special_tokens=True)
72
+ print(decoded_text)
73
+ ```
74
+
75
+ <div align="center">
76
+ <a href="https://edentns.com/">
77
+ <img src="./Logo.png" alt="Logo" style="height: 3em;">
78
+ </a>
79
+ </div>
config.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "Edentns/DataVortexTL-1.1B-v0.1",
3
+ "architectures": [
4
+ "LlamaForCausalLM"
5
+ ],
6
+ "attention_bias": false,
7
+ "attention_dropout": 0.0,
8
+ "bos_token_id": 1,
9
+ "eos_token_id": 2,
10
+ "hidden_act": "silu",
11
+ "hidden_size": 2048,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 5632,
14
+ "max_position_embeddings": 2048,
15
+ "model_type": "llama",
16
+ "num_attention_heads": 32,
17
+ "num_hidden_layers": 22,
18
+ "num_key_value_heads": 4,
19
+ "pretraining_tp": 1,
20
+ "rms_norm_eps": 1e-05,
21
+ "rope_scaling": null,
22
+ "rope_theta": 10000.0,
23
+ "tie_word_embeddings": false,
24
+ "torch_dtype": "bfloat16",
25
+ "transformers_version": "4.36.2",
26
+ "use_cache": true,
27
+ "vocab_size": 32000
28
+ }
generation_config.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token_id": 1,
3
+ "eos_token_id": 2,
4
+ "max_length": 2048,
5
+ "pad_token_id": 0,
6
+ "transformers_version": "4.36.2"
7
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d1e85fb779e33786c72ae49ce2d557849ca75e3f510ddbe0a6d62b3e993554d2
3
+ size 2200119864
special_tokens_map.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": "</s>",
17
+ "unk_token": {
18
+ "content": "<unk>",
19
+ "lstrip": false,
20
+ "normalized": false,
21
+ "rstrip": false,
22
+ "single_word": false
23
+ }
24
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347
3
+ size 499723
tokenizer_config.json ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "bos_token": "<s>",
31
+ "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 %}",
32
+ "clean_up_tokenization_spaces": false,
33
+ "eos_token": "</s>",
34
+ "legacy": false,
35
+ "model_max_length": 2048,
36
+ "pad_token": "</s>",
37
+ "padding_side": "right",
38
+ "sp_model_kwargs": {},
39
+ "tokenizer_class": "LlamaTokenizer",
40
+ "unk_token": "<unk>",
41
+ "use_default_system_prompt": false
42
+ }