|
|
|
--- |
|
|
|
tags: |
|
- llama |
|
- sh2orc |
|
|
|
base_model: |
|
- meta-llama/Meta-Llama-3.1-8B-Instruct |
|
|
|
--- |
|
|
|
![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXeiuCm7c8lEwEJuRey9kiVZsRn2W-b4pWlu3-X534V3YmVuVc2ZL-NXg2RkzSOOS2JXGHutDuyyNAUtdJI65jGTo8jT9Y99tMi4H4MqL44Uc5QKG77B0d6-JfIkZHFaUA71-RtjyYZWVIhqsNZcx8-OMaA?key=xt3VSDoCbmTY7o-cwwOFwQ) |
|
|
|
# QuantFactory/Llama-3.1-Korean-8B-Instruct-GGUF |
|
This is quantized version of [sh2orc/Llama-3.1-Korean-8B-Instruct](https://huggingface.co/sh2orc/Llama-3.1-Korean-8B-Instruct) created using llama.cpp |
|
|
|
# Original Model Card |
|
|
|
|
|
# Llama-3.1-Korean-8B-Instruct |
|
|
|
Llama-3.1-Korean-8B-Instruct is finetuned from Meta-Llama-3.1: |
|
* [meta-llama/Meta-Llama-3.1-8B-Instruct](https://huggingface.co/meta-llama/Meta-Llama-3.1-8B-Instruct) |
|
|
|
- Dataset: |
|
- [maywell/ko_wikidata_QA](https://huggingface.co/datasets/maywell/ko_wikidata_QA) |
|
- [lcw99/wikipedia-korean-20240501-1million-qna](https://huggingface.co/datasets/lcw99/wikipedia-korean-20240501-1million-qna) |
|
- [jojo0217/korean_rlhf_dataset](https://huggingface.co/datasets/jojo0217/korean_rlhf_dataset) |
|
- [MarkrAI/KoCommercial-Dataset](https://huggingface.co/datasets/MarkrAI/KoCommercial-Dataset) |
|
|
|
## π» Usage for Transformers |
|
|
|
Use with transformers |
|
Starting with ```transformers >= 4.43.0``` onward, you can run conversational inference using the Transformers pipeline abstraction or by leveraging the Auto classes with the generate() function. |
|
Make sure to update your transformers installation via ```pip install --upgrade transformers.``` |
|
|
|
```python |
|
!pip install -qU transformers accelerate |
|
|
|
from transformers import AutoTokenizer |
|
import transformers |
|
import torch |
|
|
|
model = "sh2orc/Llama-3.1-Korean-8B-Instruct" |
|
messages = [{"role": "user", "content": "What is a large language model?"}] |
|
|
|
tokenizer = AutoTokenizer.from_pretrained(model) |
|
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True) |
|
pipeline = transformers.pipeline( |
|
"text-generation", |
|
model=model, |
|
torch_dtype=torch.float16, |
|
device_map="auto", |
|
) |
|
|
|
outputs = pipeline(prompt, max_new_tokens=2048, do_sample=True, temperature=0.7, top_k=50, top_p=0.95) |
|
print(outputs[0]["generated_text"]) |
|
``` |
|
|
|
## π» Usage for VLLM |
|
|
|
Use with transformers |
|
Starting with ```vllm``` onward, you can run conversational inference using the vLLM pipeline abstraction with the gen() function. |
|
Make sure to update your vllm installation via ```pip install --upgrade vllm.``` |
|
|
|
```python |
|
from vllm import LLM, SamplingParams |
|
from transformers import AutoTokenizer, pipeline |
|
|
|
BASE_MODEL = "sh2orc/Llama-3.1-Korean-8B-Instruct" |
|
|
|
llm = LLM(model=BASE_MODEL) |
|
|
|
tokenizer = AutoTokenizer.from_pretrained(BASE_MODEL) |
|
tokenizer.pad_token = tokenizer.eos_token |
|
tokenizer.padding_side = 'right' |
|
|
|
def gen(instruction): |
|
messages = [ |
|
{ |
|
"role": "system", |
|
"content": "λΉμ μ νλ₯ν AI λΉμμ
λλ€. λ΅λ³ μ€ λͺ¨λ₯΄λ λ΄μ©μ΄λ©΄ λͺ¨λ₯Έλ€κ³ λ΅ν΄μ£ΌμΈμ. You are a great AI assistant. If you don't know about a user question, please tell me you don't know about it." |
|
}, |
|
{ |
|
"role": "user", |
|
"content": instruction |
|
}, |
|
] |
|
|
|
prompt_message = tokenizer.apply_chat_template( |
|
messages, |
|
tokenize=False, |
|
add_generation_prompt=True, |
|
) |
|
|
|
eos_token_id = [tokenizer.eos_token_id, tokenizer.convert_tokens_to_ids("<|eot_id|>")] |
|
|
|
outputs = llm.generate(prompt_message, SamplingParams( |
|
stop_token_ids=eos_token_id, |
|
temperature=0.3, |
|
top_p=0.9, |
|
frequency_penalty=1.3, |
|
max_tokens=4096)) |
|
|
|
for output in outputs: |
|
propt = output.prompt |
|
generated_text = output.outputs[0].text |
|
print(generated_text) |
|
|
|
``` |
|
|
|
## Q&A |
|
|
|
<div style="font-size:0.95rem"> |
|
|
|
**Q. λνμμ λν΄μ μλ €μ£ΌμΈμ.** <br> |
|
A. λνμ(1896λ
10μ 28μΌ ~ 1948λ
2μ)μ νκ΅μ μ¬μ± λ¬Ένκ°μ΄μ μ¬νμ΄λκ°λ‘, μΌμ κ°μ κΈ°μ λνμ μΈ μ¬μ±μ£Όμ λ¬ΈμΈμΌλ‘ μλ €μ Έ μμ΅λλ€. κ·Έλ
λ μΌλ³Έμμ κ΅μ‘μ λ°μμΌλ©°, μΌλ³Έμ μ¬μ±μ£Όμ μ΄λμ μ°Έμ¬νμμ΅λλ€. λν, νκ΅μμλ μ‘°μ μ¬μκ΅μ‘ννλ₯Ό μ€λ¦½νκ³ μ¬νκ΅ μ€λ¦½ μ΄λμ μ°Έμ¬νμμ΅λλ€. |
|
|
|
λνμμ μμ μμ€ λ± λ€μν μ₯λ₯΄λ‘ νλνμΌλ©°, κ·Έλ
μ μνλ€μ μ£Όλ‘ μ¬μ±λ€μ μΆκ³Ό μ¬ν λ¬Έμ λ₯Ό λ€λ£¨κ³ μμ΅λλ€. κ·Έλ
μ λνμμΌλ‘λ 'μ리λ', 'μκΈ', 'λΉλκΈ°' λ±μ΄ μμΌλ©°, μ΄ μ€μμλ νΉν 'μ리λ'μ κ·Έλ
κ° μ΄ κ°μ₯ μ λͺ
ν μνμ
λλ€. |
|
|
|
λν λνμμ μΌμ κ°μ κΈ°μ νλνλ μ μΉμ μΈλ¬Όλ‘μλ μ λͺ
ν©λλ€. κ·Έλ
λ λ
립μ΄λμ μ§μ§νλ©° νμΌ μ΄λμ μ°Έμ¬νμκ³ , μ΄ν λνλ―Όκ΅ μ λΆ μ립 νμλ μ μΉμ νλμ κ³μνμ΅λλ€. |
|
|
|
κ·Έλ
μ μμ μ μ
μ μ νκ΅ νλλ¬Ένε²μ μ¬μ±μ£Όμ μμ¬μμ μ€μν μν μ ν κ²μΌλ‘ νκ°λ©λλ€. |
|
|
|
**Q. 2μ°¨ μΈκ³λμ μ λν΄μ μλ €μ€** <br> |
|
A. 2μ°¨ μΈκ³ λμ μ 1939λ
λΆν° 1945λ
κΉμ§ μΌμ΄λ λκ·λͺ¨ κ΅°μ¬ μΆ©λλ‘, μ 1μ°¨ μΈκ³ λμ μ΄νμ λ°μν μ΅μ΄μ μ ꡬμ μ΄μμ΅λλ€. μ΄ μ μμ λ
μΌκ³Ό μ΄ν리μκ° μ£Όλνμ¬ λ°λ°νκ³ , μλ ¨κ³Ό λ―Έκ΅μ΄ μ£Όμ μ°ν©κ΅μΌλ‘ μ°Έμ¬νμ΅λλ€. μΌλ³Έ λν μ€λ¦½κ΅μ΄μμ§λ§, λ
μΌκ³Όμ λλ§Ή κ΄κ³λ₯Ό λ§Ίκ³ λ§μ£Όμ μ€κ΅μ μΉ¨λ΅νμμ΅λλ€. |
|
|
|
λ
μΌμ λμΉλΉμ μλν ννλ¬κ° μ§κΆνλ©΄μ νμ₯ μ μ±
μ μΆμ§νμ¬ μ€μ€νΈλ¦¬μλ₯Ό ν©λ³νκ³ μ²΄μ½μ¬λ‘λ°ν€μλ₯Ό λΆν νμμ΅λλ€. νλμ€λ ν΄λλλ₯Ό 침곡νμ§λ§ ν¨λ°°νκ³ , μκ΅λ λ
μΌμκ² ν볡νμ΅λλ€. κ·Έλ¬λ μκ΅μμλ μμ€ν΄ μ²μΉ μ΄λ¦¬κ° μ§κΆνλ©΄μ μ ν μ΄λμ΄ νλ°ν΄μ‘κ³ , λ―Έκ΅μμλ νλν΄λ¦° D 루μ¦λ²¨νΈ λν΅λ Ήμ΄ μ¬μ λλ©΄μ μ μμ μ°Έμ¬νκΈ° μμνμ΅λλ€. |
|
|
|
μλ ¨μ μ€νλ¦° μ§λ μλμμ λ
립μ μΈ μΈκ΅ μ μ±
μ μΆμ§νλ©° μΌλ³Έκ³Όμ λλ§Ή κ΄κ³λ₯Ό λ§Ίμμ§λ§, λμΉ λ
μΌκ³Όμ μ μμμ μΉλ¦¬νλ©΄μ μ λ½ μ μμ μν₯λ ₯μ νμ¬νκ² λ©λλ€. λ―Έκ΅κ³Ό μκ΅μμλ λμμ ν΄μ μμ μΉλ¦¬νλ©° μ λ½ λ³Έν λ‘ μ§κ²©νκ³ , μλ ¨ μμ λ² λ₯΄μ -λΌνμν μ κΉμ§ μ§κ²©ν©λλ€. |
|
|
|
μΌλ³Έμ μ€κ΅ λ³Έν μ νκ΅ λ°λμλ μν₯λ ₯μ νμ¬νλ©° ννμ μ§μμμμ μμ κΆ νλλ₯Ό λͺ©νλ‘ μΌμμ΅λλ€. κ·Έλ¬λ λ―Έκ΅° 곡μ΅μΌλ‘ μΈν΄ μλ₯ μμ μ€ν¨μ ν¨κ» ν¨λ°°νκ² λ©λλ€. |
|
|
|
2μ°¨ μΈκ³ λμ μλ λ§μ κ΅κ°λ€μ΄ μ°Έμ νμΌλ©°, μ¬λ§μ μλ μ½ 50~80λ°±λ§ λͺ
μ λμμ΅λλ€. μ΄ μ μμΌλ‘ μΈν΄ μ μ κΈ°κ΅¬κ° μ€λ¦½λμκ³ , κ΅μ μ°ν©μ΄λΌλ μ΄λ¦μΌλ‘ μλ €μ Έ μμ΅λλ€. |
|
|
|
λ¬Όλ‘ μ΄κ²λ§ μκ³ μμ§ μμ μλ μμΌλ λ μμΈν μκ³ μΆλ€λ©΄ μΆκ° μ§λ¬Έμ΄λ μλ£ μμ² λΆνλ립λλ€! |
|
|
|
|
|
**Q. λμ λΉλ Έλλ°, λμ μ κ°μΌλ©΄?** <br> |
|
A. λμ λΉλ Έλλ°, λμ μ κ°μΌλ©΄ ν° λ¬Έμ κ° λ°μν μ μμ΅λλ€. λ¨Όμ , λΉλ¦° μ¬λκ³Ό λμΆν μ¬λ μ¬μ΄μ κ³μ½μ΄ λ§Ίμ΄μ ΈμΌ ν©λλ€. μ΄ κ³μ½μ λ²μ μΌλ‘ μΈμ λλ©°, λμΆκΈμ‘κ³Ό μ΄μμ¨, κ°κΈ° κΈ°κ° λ±μ΄ μ ν΄μ Έ μμ΅λλ€. |
|
|
|
λμΆκΈμ λ―Έλ©νλ©΄ λ€μκ³Ό κ°μ κ²°κ³Όκ° λ°μν μ μμ΅λλ€: |
|
|
|
1. **μ΄μ λΆκ³Ό**: λ―Έλ©λ κΈμ‘μ λν μ΄μκ° λΆκ³Όλ©λλ€. μ΄μλ μκΈμ μΌμ λΉμ¨λ‘ κ³μ°λ©λλ€. |
|
2. **μ±λ¬΄λΆμ΄ν**: λμΆμ(λΉλ¦° μ¬λ)λ μ±λ¬΄λΆμ΄νμ£λ₯Ό λ²νκ² λ©λλ€. |
|
3. **λ²μ μ‘°μΉ**: μ±κΆμλ λ²μμμ μμ‘μ μ κΈ°νμ¬ μμ볡ꡬλ₯Ό μ²κ΅¬νκ±°λ λ³μ μ²κ΅¬λ₯Ό ν μ μμ΅λλ€. |
|
4. **μ μ©λ νλ½**: μ μ©νκ°λ₯Ό λ°μλ κ²½μ°μλ μ μ©λκ° νλ½νκ³ κΈμ΅κΈ°κ΄μμλ μ°¨μ
μ΄λ μΉ΄λ λ°κΈ λ±μ μ΄λ €μμ κ²ͺκ² λ©λλ€. |
|
|
|
λ°λΌμ, λΉλ¦° λμ λ°λμ μ§κΈν΄μΌ ν©λλ€. λ§μ½ μ§κΈ λΆκ°λ₯ν κ²½μ°μλ μ¦μ ν΅λ³΄νκ³ νμνμ¬ ν΄κ²°ν΄μΌ ν©λλ€. |
|
|
|
νμ§λ§ λͺ¨λ μν©μμ κ°λ₯ν κ²μ μλλ―λ‘ μ λ¬Έμ μΈ μλ΄μ΄λ λ²λ₯ μλ΄ λ±μ λ°μ보λ κ²μ΄ μ’μ΅λλ€. |
|
|
|
νΉμ λ κΆκΈνμ μ μμΌμ κ°μ? |
|
|
|
**Q. 건κ°νκ² μ΄κΈ° μν μμΈ** <br> |
|
A. 건κ°νκ² μ΄κΈ° μν μμΈλ μ¬λ¬ κ°μ§ μμκ° μμ΅λλ€. λ¨Όμ , μ’μ μμΈλ₯Ό μ μ§νλ κ²μ΄ μ€μν©λλ€. μ’μ μμΈλ κ°μ΄μ ν΄κ³ μ΄κΉ¨λ₯Ό νΈνκ² νλ κ²μ
λλ€. μ΄λ, ν리μ μλ©μ΄λ μμ°μ€λ½κ² ꡬλΆλ €μΌ ν©λλ€. |
|
|
|
λν, μμ μμ λλ λ°μ΄ νννκ² λ
μ λΏμμΌ ν©λλ€. κ·Έλ¦¬κ³ μ μμ λλ κ· νμ μ‘κ³ μμ΄μΌ ν©λλ€. |
|
|
|
λ€μμΌλ‘, μ΄λμ νμμ μ
λλ€. λ§€μΌ 30λΆ μ λμ λ¨μν μ΄λμ νκ±°λ μ‘°κΉ
μ΄λ μμ λ±μ μ°Έμ¬νλ©΄ μ’μ΅λλ€. λν, κ·μΉμ μΈ μμ¬μ μΆ©λΆν μλ©΄λ μ€μν©λλ€. |
|
|
|
λ§μ§λ§μΌλ‘ μ€νΈλ μ€ κ΄λ¦¬κ° νμν©λλ€. μ€νΈλ μ€ κ΄λ¦¬ λ°©λ²μλ λͺ
μμ΄λ μ¬νΈν‘λ² λ±μ΄ μμ΅λλ€. |
|
|
|
λ°λΌμ 건κ°νκ³ ν볡ν μΆμ μ΄κΈ° μν΄μλ μ’μ μμΈλ₯Ό μ μ§νκ³ κ·μΉμ μΈ μνμ΅κ΄κ³Ό μ΄λ λ±μ ν΅ν΄ 건κ°ν¨κ³Ό ν볡ν¨μ μΆκ΅¬ν΄μΌ ν©λλ€. |
|
|
|
κ·Έλ¬λ λͺ¨λ μ¬λλ§λ€ λ€λ₯΄λ―λ‘ κ°μΈλ³λ‘ λ§μΆ€ν μνμ΅κ΄κ³Ό μ΄λ κ³νμ΄ νμν μλ μμ΅λλ€. |
|
|
|
λν μμ¬λ μ λ¬Έκ°λ‘μ μ ννκ³ μ΅μ μ 보λ₯Ό μ 곡ν μ μμΌλ―λ‘ μμ¬μ μλ΄λ μΆμ²λ©λλ€. |
|
|
|
κΆκΈνμ μ μ μΈμ λ μ§ λ¬Όμ΄λ³΄μΈμ! |
|
|
|
**Q. 건κ°νκ² μ΄κΈ° μν΄μλ κ· ν μ‘ν μλ¨μ μ μ§νκ³ , κ·μΉμ μΈ μ΄λμ νλ κ²μ΄ μ€μν©λλ€. μΆ©λΆν μλ©΄μ μ·¨νκ³ , μ€νΈλ μ€λ₯Ό κ΄λ¦¬νλ κ²λ 건κ°μ ν° μν₯μ λ―ΈμΉ©λλ€. μ κΈ°μ μΈ κ±΄κ° κ²μ§μ ν΅ν΄ μ§λ³μ μ‘°κΈ°μ λ°κ²¬νκ³ , κ΄λ¦¬νλ κ²λ μ€μν©λλ€. μ΄κ²μ μμ΄λ‘ λ²μ** <br> |
|
A. 건κ°νκ² μ΄κΈ° μν΄μλ κ· ν μ‘ν μλ¨μ μ μ§νκ³ , κ·μΉμ μΈ μ΄λμ νλ κ²μ΄ μ€μν©λλ€. μΆ©λΆν μλ©΄μ μ·¨νκ³ , μ€νΈλ μ€λ₯Ό κ΄λ¦¬νλ κ²λ 건κ°μ ν° μν₯μ λ―ΈμΉ©λλ€. μ κΈ°μ μΈ κ±΄κ° κ²μ§μ ν΅ν΄ μ§λ³μ μ‘°κΈ°μ λ°κ²¬νκ³ , κ΄λ¦¬νλ κ²λ μ€μν©λλ€. |
|
|
|
μμ΄λ‘ λ²μνλ©΄ λ€μκ³Ό κ°μ΅λλ€: |
|
|
|
To live a healthy life, it is essential to maintain a balanced diet and regular exercise. Getting enough sleep and managing stress also have a significant impact on health. Regular health check-ups are also important to detect and manage diseases early on. |
|
|
|
λν μμ΄λ‘ λ²μλ λ¬Έμ₯μ λ€μκ³Ό κ°μ΅λλ€: |
|
|
|
Maintaining a balanced diet and regular exercise is crucial for living a healthy life. Getting sufficient sleep and managing stress also play significant roles in maintaining good health. Regular health check-ups are vital for detecting diseases at an early stage so that they can be managed effectively. |
|
|
|
λ λ€λ₯Έ μμ΄λ‘ λ²μλ λ¬Έμ₯μ λ€μκ³Ό κ°μ΅λλ€: |
|
|
|
A well-balanced diet and regular physical activity are key components of maintaining good health. Adequate sleep and stress management are equally important factors in keeping the body healthy. Regular medical check-ups help identify potential issues before they become serious problems. |
|
|
|
μ΄ μΈμλ μ¬λ¬ κ°μ§ λ°©λ²μΌλ‘ μμ΄λ‘ λ²μν μ μμ΅λλ€. |
|
|
|
**Q. λ€μμ μμ΄λ‘ λ²μν΄μ€: μΉ΄λ μ°μ²΄λ κΈμ΅ κ±°λμ ν° λΆμ΄μ΅μ μ΄λν μ μμ΅λλ€. μ°μ²΄κ° λ°μνλ©΄ μ μ©λ±κΈμ΄ ν¬κ² νλ½νκ² λλ©°, μ΄λ μ΄ν λμΆ μ μ² μ κ±°μ λΉνκ±°λ λΆλ¦¬ν 쑰건μ λ°λ κ²°κ³Όλ₯Ό μ΄λν μ μμ΅λλ€. λν, μΉ΄λμ¬λ‘λΆν° κ³ κΈλ¦¬ λμΆμ΄λ κΈ°ν λΆμ±μ μ μμ λ°μ κ°λ₯μ±μ΄ λμ΅λλ€.** <br> |
|
A. μΉ΄λ μ°μ²΄λ κΈμ΅ κ±°λμ ν° λΆμ΄μ΅μ μ΄λν μ μμ΅λλ€. μ°μ²΄κ° λ°μνλ©΄ μ μ©λ±κΈμ΄ ν¬κ² νλ½νκ² λλ©°, μ΄λ μ΄ν λμΆ μ μ² μ κ±°μ λΉνκ±°λ λΆλ¦¬ν 쑰건μ λ°λ κ²°κ³Όλ₯Ό μ΄λν μ μμ΅λλ€. λν, μΉ΄λμ¬λ‘λΆν° κ³ κΈλ¦¬ λμΆμ΄λ κΈ°ν λΆμ±μ μ μμ λ°μ κ°λ₯μ±μ΄ λμ΅λλ€. |
|
|
|
(μλ¬Έ λ²μ) |
|
|
|
Overdue credit card payments can cause significant financial inconvenience. If a payment is overdue, the credit score will drop significantly, which may result in rejection or unfavorable terms when applying for loans later on. Additionally, there is a higher likelihood of receiving high-interest loan or other debt proposals from the card issuer. |
|
|
|
|
|
</div> |
|
|