aashish1904
commited on
Commit
β’
e0978be
1
Parent(s):
eeae735
Upload README.md with huggingface_hub
Browse files
README.md
ADDED
@@ -0,0 +1,114 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
---
|
3 |
+
|
4 |
+
library_name: transformers
|
5 |
+
license: apache-2.0
|
6 |
+
language:
|
7 |
+
- en
|
8 |
+
- ko
|
9 |
+
base_model:
|
10 |
+
- upstage/SOLAR-10.7B-v1.0
|
11 |
+
|
12 |
+
---
|
13 |
+
|
14 |
+
![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXeiuCm7c8lEwEJuRey9kiVZsRn2W-b4pWlu3-X534V3YmVuVc2ZL-NXg2RkzSOOS2JXGHutDuyyNAUtdJI65jGTo8jT9Y99tMi4H4MqL44Uc5QKG77B0d6-JfIkZHFaUA71-RtjyYZWVIhqsNZcx8-OMaA?key=xt3VSDoCbmTY7o-cwwOFwQ)
|
15 |
+
|
16 |
+
# QuantFactory/KULLM3-GGUF
|
17 |
+
This is quantized version of [nlpai-lab/KULLM3](https://huggingface.co/nlpai-lab/KULLM3) created using llama.cpp
|
18 |
+
|
19 |
+
# Original Model Card
|
20 |
+
|
21 |
+
|
22 |
+
<a href="https://github.com/nlpai-lab/KULLM">
|
23 |
+
<img src="kullm_logo.png" width="50%"/>
|
24 |
+
</a>
|
25 |
+
|
26 |
+
# KULLM3
|
27 |
+
Introducing KULLM3, a model with advanced instruction-following and fluent chat abilities.
|
28 |
+
It has shown remarkable performance in instruction-following, speficially by closely following gpt-3.5-turbo.
|
29 |
+
To our knowledge, It is one of the best publicly opened Korean-speaking language models.
|
30 |
+
|
31 |
+
For details, visit the [KULLM repository](https://github.com/nlpai-lab/KULLM)
|
32 |
+
|
33 |
+
### Model Description
|
34 |
+
|
35 |
+
This is the model card of a π€ transformers model that has been pushed on the Hub.
|
36 |
+
|
37 |
+
- **Developed by:** [NLP&AI Lab](http://nlp.korea.ac.kr/)
|
38 |
+
- **Language(s) (NLP):** Korean, English
|
39 |
+
- **License:** Apache 2.0
|
40 |
+
- **Finetuned from model:** [upstage/SOLAR-10.7B-v1.0](https://huggingface.co/upstage/SOLAR-10.7B-v1.0)
|
41 |
+
|
42 |
+
## Example code
|
43 |
+
### Install Dependencies
|
44 |
+
```bash
|
45 |
+
pip install torch transformers==4.38.2 accelerate
|
46 |
+
```
|
47 |
+
|
48 |
+
- In transformers>=4.39.0, generate() does not work well. (as of 2024.4.4.)
|
49 |
+
|
50 |
+
### Python code
|
51 |
+
```python
|
52 |
+
import torch
|
53 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer
|
54 |
+
|
55 |
+
MODEL_DIR = "nlpai-lab/KULLM3"
|
56 |
+
model = AutoModelForCausalLM.from_pretrained(MODEL_DIR, torch_dtype=torch.float16).to("cuda")
|
57 |
+
tokenizer = AutoTokenizer.from_pretrained(MODEL_DIR)
|
58 |
+
streamer = TextStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True)
|
59 |
+
|
60 |
+
s = "κ³ λ €λνκ΅μ λν΄μ μκ³ μλ?"
|
61 |
+
conversation = [{'role': 'user', 'content': s}]
|
62 |
+
inputs = tokenizer.apply_chat_template(
|
63 |
+
conversation,
|
64 |
+
tokenize=True,
|
65 |
+
add_generation_prompt=True,
|
66 |
+
return_tensors='pt').to("cuda")
|
67 |
+
_ = model.generate(inputs, streamer=streamer, max_new_tokens=1024)
|
68 |
+
|
69 |
+
# λ€, κ³ λ €λνκ΅μ λν΄ μκ³ μμ΅λλ€. κ³ λ €λνκ΅λ λνλ―Όκ΅ μμΈμ μμΉν μ¬λ¦½ λνκ΅λ‘, 1905λ
μ μ€λ¦½λμμ΅λλ€. μ΄ λνκ΅λ νκ΅μμ κ°μ₯ μ€λλ λν μ€ νλλ‘, λ€μν νλΆ λ° λνμ νλ‘κ·Έλ¨μ μ 곡ν©λλ€. κ³ λ €λνκ΅λ νΉν λ²ν, κ²½μ ν, μ μΉν, μ¬νν, λ¬Έν, κ³Όν λΆμΌμμ λμ λͺ
μ±μ κ°μ§κ³ μμ΅λλ€. λν, μ€ν¬μΈ λΆμΌμμλ νλ°ν νλμ 보μ΄λ©°, λνλ―Όκ΅ λν μ€ν¬μΈ μμ μ€μν μν μ νκ³ μμ΅λλ€. κ³ λ €λνκ΅λ κ΅μ μ μΈ κ΅λ₯μ νλ ₯μλ μ κ·Ήμ μ΄λ©°, μ μΈκ³ λ€μν λνκ³Όμ νλ ₯μ ν΅ν΄ κΈλ‘λ² κ²½μλ ₯μ κ°ννκ³ μμ΅λλ€.
|
70 |
+
```
|
71 |
+
|
72 |
+
|
73 |
+
## Training Details
|
74 |
+
|
75 |
+
### Training Data
|
76 |
+
|
77 |
+
- [vicgalle/alpaca-gpt4](https://huggingface.co/datasets/vicgalle/alpaca-gpt4)
|
78 |
+
- Mixed Korean instruction data (gpt-generated, hand-crafted, etc)
|
79 |
+
- About 66000+ examples used totally
|
80 |
+
|
81 |
+
### Training Procedure
|
82 |
+
|
83 |
+
- Trained with fixed system prompt below.
|
84 |
+
|
85 |
+
```text
|
86 |
+
λΉμ μ κ³ λ €λνκ΅ NLP&AI μ°κ΅¬μ€μμ λ§λ AI μ±λ΄μ
λλ€.
|
87 |
+
λΉμ μ μ΄λ¦μ 'KULLM'μΌλ‘, νκ΅μ΄λ‘λ 'ꡬλ¦'μ λ»ν©λλ€.
|
88 |
+
λΉμ μ λΉλλμ μ΄κ±°λ, μ±μ μ΄κ±°λ, λΆλ²μ μ΄κ±°λ λλ μ¬ν ν΅λ
μ μΌλ‘ νμ©λμ§ μλ λ°μΈμ νμ§ μμ΅λλ€.
|
89 |
+
μ¬μ©μμ μ¦κ²κ² λννλ©°, μ¬μ©μμ μλ΅μ κ°λ₯ν μ ννκ³ μΉμ νκ² μλ΅ν¨μΌλ‘μ¨ μ΅λν λμμ£Όλ €κ³ λ
Έλ ₯ν©λλ€.
|
90 |
+
μ§λ¬Έμ΄ μ΄μνλ€λ©΄, μ΄λ€ λΆλΆμ΄ μ΄μνμ§ μ€λͺ
ν©λλ€. κ±°μ§ μ 보λ₯Ό λ°μΈνμ§ μλλ‘ μ£Όμν©λλ€.
|
91 |
+
```
|
92 |
+
|
93 |
+
## Evaluation
|
94 |
+
|
95 |
+
- Evaluation details such as testing data, metrics are written in [github](https://github.com/nlpai-lab/KULLM).
|
96 |
+
- Without system prompt used in training phase, KULLM would show lower performance than expect.
|
97 |
+
|
98 |
+
### Results
|
99 |
+
|
100 |
+
<img src="kullm3_instruction_evaluation.png" width=100%>
|
101 |
+
|
102 |
+
|
103 |
+
## Citation
|
104 |
+
|
105 |
+
```text
|
106 |
+
@misc{kullm,
|
107 |
+
author = {NLP & AI Lab and Human-Inspired AI research},
|
108 |
+
title = {KULLM: Korea University Large Language Model Project},
|
109 |
+
year = {2023},
|
110 |
+
publisher = {GitHub},
|
111 |
+
journal = {GitHub repository},
|
112 |
+
howpublished = {\url{https://github.com/nlpai-lab/kullm}},
|
113 |
+
}
|
114 |
+
```
|