File size: 1,997 Bytes
64685a1
 
 
 
 
 
 
 
dff2d05
 
 
 
 
 
 
 
 
 
 
64685a1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
---
tags:
- text-generation
license: cc-by-nc-sa-4.0
language:
- ko
base_model: TinyLlama/TinyLlama-1.1B-Chat-v1.0
pipeline_tag: text-generation
widget:
  - text: >
      <|system|>

      You are a chatbot who answers User's questions.</s>

      <|user|>

      대한민국의 수도는 어디야?</s>

      <|assistant|>
---

# **DataVortexTL-1.1B-v0.1**
<img src="./DataVortex.png" alt="DataVortex" style="height: 8em;">

## **License**

[cc-by-nc-sa-4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/)

## **Model Details**

### **Base Model**
[TinyLlama/TinyLlama-1.1B-Chat-v1.0](https://huggingface.co/TinyLlama/TinyLlama-1.1B-Chat-v1.0)  

### **Trained On**
H100 80GB 1ea

### **Instruction format**

<!-- It follows **(No Input) Alpaca** format. -->

## **Model Benchmark**

### **Ko-LLM-Leaderboard**

On Benchmarking...

# **Implementation Code**

Since, chat_template already contains insturction format above.
You can use the code below.

```python
from transformers import AutoModelForCausalLM, AutoTokenizer

device = "cuda"

model = AutoModelForCausalLM.from_pretrained("Edentns/DataVortexTL-1.1B-v0.1", device_map=device)
tokenizer = AutoTokenizer.from_pretrained("Edentns/DataVortexTL-1.1B-v0.1")

messages = [
    { "role": "user", "content": "대한민국의 수도는 어디야?" }
]

encoded = tokenizer.apply_chat_template(
    messages,
    add_generation_prompt=True,
    return_tensors="pt",
    return_token_type_ids=False
).to(device)

decoded = model.generate(
    input_ids=encoded,
    temperature=0.2,
    top_p=0.9,
    repetition_penalty=1.2,
    do_sample=True,
    max_length=4096,
    eos_token_id=tokenizer.eos_token_id,
    pad_token_id=tokenizer.eos_token_id
)
decoded = decoded[0][encoded.shape[1]:decoded[0].shape[-1]]
decoded_text = tokenizer.decode(decoded, skip_special_tokens=True)
print(decoded_text)
```

<div align="center">
    <a href="https://edentns.com/">
        <img src="./Logo.png" alt="Logo" style="height: 3em;">
    </a>
</div>