Instructions to use QuantFactory/KULLM3-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use QuantFactory/KULLM3-GGUF with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("QuantFactory/KULLM3-GGUF", dtype="auto") - llama-cpp-python
How to use QuantFactory/KULLM3-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="QuantFactory/KULLM3-GGUF", filename="KULLM3.Q2_K.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use QuantFactory/KULLM3-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf QuantFactory/KULLM3-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf QuantFactory/KULLM3-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf QuantFactory/KULLM3-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf QuantFactory/KULLM3-GGUF: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 QuantFactory/KULLM3-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf QuantFactory/KULLM3-GGUF: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 QuantFactory/KULLM3-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf QuantFactory/KULLM3-GGUF:Q4_K_M
Use Docker
docker model run hf.co/QuantFactory/KULLM3-GGUF:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use QuantFactory/KULLM3-GGUF with Ollama:
ollama run hf.co/QuantFactory/KULLM3-GGUF:Q4_K_M
- Unsloth Studio new
How to use QuantFactory/KULLM3-GGUF 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 QuantFactory/KULLM3-GGUF 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 QuantFactory/KULLM3-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for QuantFactory/KULLM3-GGUF to start chatting
- Docker Model Runner
How to use QuantFactory/KULLM3-GGUF with Docker Model Runner:
docker model run hf.co/QuantFactory/KULLM3-GGUF:Q4_K_M
- Lemonade
How to use QuantFactory/KULLM3-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull QuantFactory/KULLM3-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.KULLM3-GGUF-Q4_K_M
List all available models
lemonade list
QuantFactory/KULLM3-GGUF
This is quantized version of nlpai-lab/KULLM3 created using llama.cpp
Original Model Card
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
Model Description
This is the model card of a π€ transformers model that has been pushed on the Hub.
- Developed by: NLP&AI Lab
- Language(s) (NLP): Korean, English
- License: Apache 2.0
- Finetuned from model: upstage/SOLAR-10.7B-v1.0
Example code
Install Dependencies
pip install torch transformers==4.38.2 accelerate
- In transformers>=4.39.0, generate() does not work well. (as of 2024.4.4.)
Python code
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer
MODEL_DIR = "nlpai-lab/KULLM3"
model = AutoModelForCausalLM.from_pretrained(MODEL_DIR, torch_dtype=torch.float16).to("cuda")
tokenizer = AutoTokenizer.from_pretrained(MODEL_DIR)
streamer = TextStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True)
s = "κ³ λ €λνκ΅μ λν΄μ μκ³ μλ?"
conversation = [{'role': 'user', 'content': s}]
inputs = tokenizer.apply_chat_template(
conversation,
tokenize=True,
add_generation_prompt=True,
return_tensors='pt').to("cuda")
_ = model.generate(inputs, streamer=streamer, max_new_tokens=1024)
# λ€, κ³ λ €λνκ΅μ λν΄ μκ³ μμ΅λλ€. κ³ λ €λνκ΅λ λνλ―Όκ΅ μμΈμ μμΉν μ¬λ¦½ λνκ΅λ‘, 1905λ
μ μ€λ¦½λμμ΅λλ€. μ΄ λνκ΅λ νκ΅μμ κ°μ₯ μ€λλ λν μ€ νλλ‘, λ€μν νλΆ λ° λνμ νλ‘κ·Έλ¨μ μ 곡ν©λλ€. κ³ λ €λνκ΅λ νΉν λ²ν, κ²½μ ν, μ μΉν, μ¬νν, λ¬Έν, κ³Όν λΆμΌμμ λμ λͺ
μ±μ κ°μ§κ³ μμ΅λλ€. λν, μ€ν¬μΈ λΆμΌμμλ νλ°ν νλμ 보μ΄λ©°, λνλ―Όκ΅ λν μ€ν¬μΈ μμ μ€μν μν μ νκ³ μμ΅λλ€. κ³ λ €λνκ΅λ κ΅μ μ μΈ κ΅λ₯μ νλ ₯μλ μ κ·Ήμ μ΄λ©°, μ μΈκ³ λ€μν λνκ³Όμ νλ ₯μ ν΅ν΄ κΈλ‘λ² κ²½μλ ₯μ κ°ννκ³ μμ΅λλ€.
Training Details
Training Data
- 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.
- Without system prompt used in training phase, KULLM would show lower performance than expect.
Results
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}},
}
- Downloads last month
- 99
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit
Model tree for QuantFactory/KULLM3-GGUF
Base model
upstage/SOLAR-10.7B-v1.0
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("QuantFactory/KULLM3-GGUF", dtype="auto")