taeminlee/KULLM3-awq
<a href="https://github.com/nlpai-lab/KULLM"> <img src="https://huggingface.co/nlpai-lab/KULLM3/resolve/main/kullm_logo.png" width="50%"/> </a>
This repository is the awq quantization version of KULLM3.
The quantization was carried out in a custom branch of autoawq. The hyperparameters for quantization are as follows.
It worked using [vllm](https://github.com/vllm-project/vllm). It may not work with other frameworks as they have not been tested.
Below is the README.md for the original model.
---
# KULLM3
Introducing KULLM3, a model with advanced instruction-following and fluent chat abilities.
It has shown remarkable performance in instruction-following, speficially by closely following gpt-3.5-turbo.
To our knowledge, It is one of the best publicly opened Korean-speaking language models.
For details, visit the [KULLM repository](https://github.com/nlpai-lab/KULLM)
### Model Description
This is the model card of a π€ transformers model that has been pushed on the Hub.
- **Developed by:** [NLP&AI Lab](http://nlp.korea.ac.kr/)
- **Language(s) (NLP):** Korean, English
- **License:** CC-BY-NC 4.0
- **Finetuned from model:** [upstage/SOLAR-10.7B-Instruct-v1.0](https://huggingface.co/upstage/SOLAR-10.7B-Instruct-v1.0)
## Example code
### Install Dependenciespip install torch transformers==4.38.2 accelerate
- In transformers>=4.39.0, generate() does not work well. (as of 2024.4.4.)
### Python codeimport torch from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer
MODELDIR = "nlpai-lab/KULLM3" model = AutoModelForCausalLM.frompretrained(MODELDIR, torchdtype=torch.float16).to("cuda") tokenizer = AutoTokenizer.frompretrained(MODELDIR) streamer = TextStreamer(tokenizer, skipprompt=True, skipspecial_tokens=True)
s = "κ³ λ €λνκ΅μ λν΄μ μκ³ μλ?" conversation = [{'role': 'user', 'content': s}] inputs = tokenizer.applychattemplate( conversation, tokenize=True, addgenerationprompt=True, returntensors='pt').to("cuda") = model.generate(inputs, streamer=streamer, maxnewtokens=1024)
λ€, κ³ λ €λνκ΅μ λν΄ μκ³ μμ΅λλ€. κ³ λ €λνκ΅λ λνλ―Όκ΅ μμΈμ μμΉν μ¬λ¦½ λνκ΅λ‘, 1905λ μ μ€λ¦½λμμ΅λλ€. μ΄ λνκ΅λ νκ΅μμ κ°μ₯ μ€λλ λν μ€ νλλ‘, λ€μν νλΆ λ° λνμ νλ‘κ·Έλ¨μ μ 곡ν©λλ€. κ³ λ €λνκ΅λ νΉν λ²ν, κ²½μ ν, μ μΉν, μ¬νν, λ¬Έν, κ³Όν λΆμΌμμ λμ λͺ μ±μ κ°μ§κ³ μμ΅λλ€. λν, μ€ν¬μΈ λΆμΌμμλ νλ°ν νλμ 보μ΄λ©°, λνλ―Όκ΅ λν μ€ν¬μΈ μμ μ€μν μν μ νκ³ μμ΅λλ€. κ³ λ €λνκ΅λ κ΅μ μ μΈ κ΅λ₯μ νλ ₯μλ μ κ·Ήμ μ΄λ©°, μ μΈκ³ λ€μν λνκ³Όμ νλ ₯μ ν΅ν΄ κΈλ‘λ² κ²½μλ ₯μ κ°ννκ³ μμ΅λλ€.
## Training Details
### Training Data
- [vicgalle/alpaca-gpt4](https://huggingface.co/datasets/vicgalle/alpaca-gpt4)
- Mixed Korean instruction data (gpt-generated, hand-crafted, etc)
- About 66000+ examples used totally
### Training Procedure
- Trained with fixed system prompt below.
λΉμ μ κ³ λ €λνκ΅ NLP&AI μ°κ΅¬μ€μμ λ§λ AI μ±λ΄μ λλ€. λΉμ μ μ΄λ¦μ 'KULLM'μΌλ‘, νκ΅μ΄λ‘λ 'ꡬλ¦'μ λ»ν©λλ€. λΉμ μ λΉλλμ μ΄κ±°λ, μ±μ μ΄κ±°λ, λΆλ²μ μ΄κ±°λ λλ μ¬ν ν΅λ μ μΌλ‘ νμ©λμ§ μλ λ°μΈμ νμ§ μμ΅λλ€. μ¬μ©μμ μ¦κ²κ² λννλ©°, μ¬μ©μμ μλ΅μ κ°λ₯ν μ ννκ³ μΉμ νκ² μλ΅ν¨μΌλ‘μ¨ μ΅λν λμμ£Όλ €κ³ λ Έλ ₯ν©λλ€. μ§λ¬Έμ΄ μ΄μνλ€λ©΄, μ΄λ€ λΆλΆμ΄ μ΄μνμ§ μ€λͺ ν©λλ€. κ±°μ§ μ 보λ₯Ό λ°μΈνμ§ μλλ‘ μ£Όμν©λλ€.
## Evaluation
- Evaluation details such as testing data, metrics are written in [github](https://github.com/nlpai-lab/KULLM).
- Without system prompt used in training phase, KULLM would show lower performance than expect.
### Results
<img src="https://huggingface.co/nlpai-lab/KULLM3/resolve/main/kullm3_instruction_evaluation.png" width=100%>
## Citation
@misc{kullm, author = {NLP & AI Lab and Human-Inspired AI research}, title = {KULLM: Korea University Large Language Model Project}, year = {2023}, publisher = {GitHub}, journal = {GitHub repository}, howpublished = {\url{https://github.com/nlpai-lab/kullm}}, }
