Instructions to use MLP-KTLim/llama-3-Korean-Bllossom-8B-gguf-Q4_K_M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MLP-KTLim/llama-3-Korean-Bllossom-8B-gguf-Q4_K_M with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("MLP-KTLim/llama-3-Korean-Bllossom-8B-gguf-Q4_K_M", dtype="auto") - llama-cpp-python
How to use MLP-KTLim/llama-3-Korean-Bllossom-8B-gguf-Q4_K_M with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="MLP-KTLim/llama-3-Korean-Bllossom-8B-gguf-Q4_K_M", filename="llama-3-Korean-Bllossom-8B-Q4_K_M.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use MLP-KTLim/llama-3-Korean-Bllossom-8B-gguf-Q4_K_M with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf MLP-KTLim/llama-3-Korean-Bllossom-8B-gguf-Q4_K_M:Q4_K_M # Run inference directly in the terminal: llama-cli -hf MLP-KTLim/llama-3-Korean-Bllossom-8B-gguf-Q4_K_M:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf MLP-KTLim/llama-3-Korean-Bllossom-8B-gguf-Q4_K_M:Q4_K_M # Run inference directly in the terminal: llama-cli -hf MLP-KTLim/llama-3-Korean-Bllossom-8B-gguf-Q4_K_M:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf MLP-KTLim/llama-3-Korean-Bllossom-8B-gguf-Q4_K_M:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf MLP-KTLim/llama-3-Korean-Bllossom-8B-gguf-Q4_K_M:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf MLP-KTLim/llama-3-Korean-Bllossom-8B-gguf-Q4_K_M:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf MLP-KTLim/llama-3-Korean-Bllossom-8B-gguf-Q4_K_M:Q4_K_M
Use Docker
docker model run hf.co/MLP-KTLim/llama-3-Korean-Bllossom-8B-gguf-Q4_K_M:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use MLP-KTLim/llama-3-Korean-Bllossom-8B-gguf-Q4_K_M with Ollama:
ollama run hf.co/MLP-KTLim/llama-3-Korean-Bllossom-8B-gguf-Q4_K_M:Q4_K_M
- Unsloth Studio
How to use MLP-KTLim/llama-3-Korean-Bllossom-8B-gguf-Q4_K_M with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for MLP-KTLim/llama-3-Korean-Bllossom-8B-gguf-Q4_K_M to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for MLP-KTLim/llama-3-Korean-Bllossom-8B-gguf-Q4_K_M to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for MLP-KTLim/llama-3-Korean-Bllossom-8B-gguf-Q4_K_M to start chatting
- Atomic Chat new
- Docker Model Runner
How to use MLP-KTLim/llama-3-Korean-Bllossom-8B-gguf-Q4_K_M with Docker Model Runner:
docker model run hf.co/MLP-KTLim/llama-3-Korean-Bllossom-8B-gguf-Q4_K_M:Q4_K_M
- Lemonade
How to use MLP-KTLim/llama-3-Korean-Bllossom-8B-gguf-Q4_K_M with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull MLP-KTLim/llama-3-Korean-Bllossom-8B-gguf-Q4_K_M:Q4_K_M
Run and chat with the model
lemonade run user.llama-3-Korean-Bllossom-8B-gguf-Q4_K_M-Q4_K_M
List all available models
lemonade list
Update!
- [2024.06.18] μ¬μ νμ΅λμ 250GBκΉμ§ λλ¦° Bllossom ELOλͺ¨λΈλ‘ μ λ°μ΄νΈ λμμ΅λλ€. λ€λ§ λ¨μ΄νμ₯μ νμ§ μμμ΅λλ€. κΈ°μ‘΄ λ¨μ΄νμ₯λ long-context λͺ¨λΈμ νμ©νκ³ μΆμΌμ λΆμ κ°μΈμ°λ½μ£ΌμΈμ!
- [2024.06.18] Bllossom ELO λͺ¨λΈμ μ체 κ°λ°ν ELOμ¬μ νμ΅ κΈ°λ°μΌλ‘ μλ‘μ΄ νμ΅λ λͺ¨λΈμ λλ€. LogicKor λ²€μΉλ§ν¬ κ²°κ³Ό νμ‘΄νλ νκ΅μ΄ 10Bμ΄ν λͺ¨λΈμ€ SOTAμ μλ₯Ό λ°μμ΅λλ€.
LogicKor μ±λ₯ν :
| Model | Math | Reasoning | Writing | Coding | Understanding | Grammar | Single ALL | Multi ALL | Overall |
|---|---|---|---|---|---|---|---|---|---|
| gpt-3.5-turbo-0125 | 7.14 | 7.71 | 8.28 | 5.85 | 9.71 | 6.28 | 7.50 | 7.95 | 7.72 |
| gemini-1.5-pro-preview-0215 | 8.00 | 7.85 | 8.14 | 7.71 | 8.42 | 7.28 | 7.90 | 6.26 | 7.08 |
| llama-3-Korean-Bllossom-8B | 5.43 | 8.29 | 9.0 | 4.43 | 7.57 | 6.86 | 6.93 | 6.93 | 6.93 |
Bllossom | Demo | Homepage | Github
- λ³Έ λͺ¨λΈμ CPUμμ ꡬλκ°λ₯νλ©° λΉ λ₯Έ μλλ₯Ό μν΄μλ 8GB GPUμμ ꡬλ κ°λ₯ν μμν λͺ¨λΈμ λλ€! Colab μμ |
μ ν¬ Bllossomν μμ νκ΅μ΄-μμ΄ μ΄μ€ μΈμ΄λͺ¨λΈμΈ Bllossomμ 곡κ°νμ΅λλ€!
μμΈκ³ΌκΈ°λ μνΌμ»΄ν¨ν
μΌν°μ μ§μμΌλ‘ 100GBκ°λλ νκ΅μ΄λ‘ λͺ¨λΈμ 체λ₯Ό ννλν νκ΅μ΄ κ°ν μ΄μ€μΈμ΄ λͺ¨λΈμ
λλ€!
νκ΅μ΄ μνλ λͺ¨λΈ μ°Ύκ³ μμ§ μμΌμ
¨λμ?
- νκ΅μ΄ μ΅μ΄! λ¬΄λ € 3λ§κ°κ° λλ νκ΅μ΄ μ΄ννμ₯
- Llama3λλΉ λλ΅ 25% λ κΈ΄ κΈΈμ΄μ νκ΅μ΄ Context μ²λ¦¬κ°λ₯
- νκ΅μ΄-μμ΄ Pararell Corpusλ₯Ό νμ©ν νκ΅μ΄-μμ΄ μ§μμ°κ²° (μ¬μ νμ΅)
- νκ΅μ΄ λ¬Έν, μΈμ΄λ₯Ό κ³ λ €ν΄ μΈμ΄νμκ° μ μν λ°μ΄ν°λ₯Ό νμ©ν λ―ΈμΈμ‘°μ
- κ°ννμ΅
μ΄ λͺ¨λ κ² νκΊΌλ²μ μ μ©λκ³ μμ
μ μ΄μ©μ΄ κ°λ₯ν Bllossomμ μ΄μ©ν΄ μ¬λ¬λΆ λ§μ λͺ¨λΈμ λ§λ€μ΄λ³΄μΈμ₯!
λ³Έ λͺ¨λΈμ CPUμμ ꡬλκ°λ₯νλ©° λΉ λ₯Έ μλλ₯Ό μν΄μλ 6GB GPUμμ ꡬλ κ°λ₯ν μμν λͺ¨λΈμ
λλ€!
1. Bllossom-8Bλ μμΈκ³ΌκΈ°λ, ν
λμΈ, μ°μΈλ μΈμ΄μμ μ°κ΅¬μ€μ μΈμ΄νμμ νμ
ν΄ λ§λ μ€μ©μ£ΌμκΈ°λ° μΈμ΄λͺ¨λΈμ
λλ€! μμΌλ‘ μ§μμ μΈ μ
λ°μ΄νΈλ₯Ό ν΅ν΄ κ΄λ¦¬νκ² μ΅λλ€ λ§μ΄ νμ©ν΄μ£ΌμΈμ π
2. μ΄ κ°λ ₯ν Advanced-Bllossom 8B, 70Bλͺ¨λΈ, μκ°-μΈμ΄λͺ¨λΈμ 보μ νκ³ μμ΅λλ€! (κΆκΈνμ λΆμ κ°λ³ μ°λ½μ£ΌμΈμ!!)
3. Bllossomμ NAACL2024, LREC-COLING2024 (ꡬλ) λ°νλ‘ μ±νλμμ΅λλ€.
4. μ’μ μΈμ΄λͺ¨λΈ κ³μ μ
λ°μ΄νΈ νκ² μ΅λλ€!! νκ΅μ΄ κ°νλ₯Όμν΄ κ³΅λ μ°κ΅¬νμ€λΆ(νΉνλ
Όλ¬Έ) μΈμ λ νμν©λλ€!!
νΉν μλμ GPUλΌλ λμ¬ κ°λ₯ννμ μΈμ λ μ°λ½μ£ΌμΈμ! λ§λ€κ³ μΆμκ±° λμλλ €μ.
The Bllossom language model is a Korean-English bilingual language model based on the open-source LLama3. It enhances the connection of knowledge between Korean and English. It has the following features:
- Knowledge Linking: Linking Korean and English knowledge through additional training
- Vocabulary Expansion: Expansion of Korean vocabulary to enhance Korean expressiveness.
- Instruction Tuning: Tuning using custom-made instruction following data specialized for Korean language and Korean culture
- Human Feedback: DPO has been applied
- Vision-Language Alignment: Aligning the vision transformer with this language model
This model developed by MLPLab at Seoultech, Teddysum and Yonsei Univ.
This model was converted to GGUF format from MLP-KTLim/llama-3-Korean-Bllossom-8B using llama.cpp via the ggml.ai's GGUF-my-repo space.
Refer to the original model card for more details on the model.
Demo Video
NEWS
- [2024.05.08] Vocab Expansion Model Update
- [2024.04.25] We released Bllossom v2.0, based on llama-3
- [2023/12] We released Bllossom-Vision v1.0, based on Bllossom
- [2023/08] We released Bllossom v1.0, based on llama-2.
- [2023/07] We released Bllossom v0.7, based on polyglot-ko.
Example code
!CMAKE_ARGS="-DLLAMA_CUDA=on" pip install llama-cpp-python
!huggingface-cli download MLP-KTLim/llama-3-Korean-Bllossom-8B-gguf-Q4_K_M --local-dir='YOUR-LOCAL-FOLDER-PATH'
from llama_cpp import Llama
from transformers import AutoTokenizer
model_id = 'MLP-KTLim/llama-3-Korean-Bllossom-8B-gguf-Q4_K_M'
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = Llama(
model_path='YOUR-LOCAL-FOLDER-PATH/llama-3-Korean-Bllossom-8B-Q4_K_M.gguf',
n_ctx=512,
n_gpu_layers=-1 # Number of model layers to offload to GPU
)
PROMPT = \
'''λΉμ μ μ μ©ν AI μ΄μμ€ν΄νΈμ
λλ€. μ¬μ©μμ μ§μμ λν΄ μΉμ νκ³ μ ννκ² λ΅λ³ν΄μΌ ν©λλ€.
You are a helpful AI assistant, you'll need to answer users' queries in a friendly and accurate manner.'''
instruction = 'Your Instruction'
messages = [
{"role": "system", "content": f"{PROMPT}"},
{"role": "user", "content": f"{instruction}"}
]
prompt = tokenizer.apply_chat_template(
messages,
tokenize = False,
add_generation_prompt=True
)
generation_kwargs = {
"max_tokens":512,
"stop":["<|eot_id|>"],
"top_p":0.9,
"temperature":0.6,
"echo":True, # Echo the prompt in the output
}
resonse_msg = model(prompt, **generation_kwargs)
print(resonse_msg['choices'][0]['text'][len(prompt):])
Citation
Language Model
@misc{bllossom,
author = {ChangSu Choi, Yongbin Jeong, Seoyoon Park, InHo Won, HyeonSeok Lim, SangMin Kim, Yejee Kang, Chanhyuk Yoon, Jaewan Park, Yiseul Lee, HyeJin Lee, Younggyun Hahm, Hansaem Kim, KyungTae Lim},
title = {Optimizing Language Augmentation for Multilingual Large Language Models: A Case Study on Korean},
year = {2024},
journal = {LREC-COLING 2024},
paperLink = {\url{https://arxiv.org/pdf/2403.10882}},
},
}
Vision-Language Model
@misc{bllossom-V,
author = {Dongjae Shin, Hyunseok Lim, Inho Won, Changsu Choi, Minjun Kim, Seungwoo Song, Hangyeol Yoo, Sangmin Kim, Kyungtae Lim},
title = {X-LLaVA: Optimizing Bilingual Large Vision-Language Alignment},
year = {2024},
publisher = {GitHub},
journal = {NAACL 2024 findings},
paperLink = {\url{https://arxiv.org/pdf/2403.11399}},
},
}
Contact
- μκ²½ν(KyungTae Lim), Professor at Seoultech.
ktlim@seoultech.ac.kr - ν¨μκ· (Younggyun Hahm), CEO of Teddysum.
hahmyg@teddysum.ai - κΉνμ(Hansaem Kim), Professor at Yonsei.
khss@yonsei.ac.kr
Contributor
- μ΅μ°½μ(Chansu Choi), choics2623@seoultech.ac.kr
- κΉμλ―Ό(Sangmin Kim), sangmin9708@naver.com
- μμΈνΈ(Inho Won), wih1226@seoultech.ac.kr
- κΉλ―Όμ€(Minjun Kim), mjkmain@seoultech.ac.kr
- μ‘μΉμ°(Seungwoo Song), sswoo@seoultech.ac.kr
- μ λμ¬(Dongjae Shin), dylan1998@seoultech.ac.kr
- μνμ(Hyeonseok Lim), gustjrantk@seoultech.ac.kr
- μ‘μ ν(Jeonghun Yuk), usually670@gmail.com
- μ νκ²°(Hangyeol Yoo), 21102372@seoultech.ac.kr
- μ‘μν(Seohyun Song), alexalex225225@gmail.com
- Downloads last month
- 2,609
4-bit
Model tree for MLP-KTLim/llama-3-Korean-Bllossom-8B-gguf-Q4_K_M
Base model
meta-llama/Meta-Llama-3-8B