Instructions to use DSAiLab/KoMultiGen-general-gptq-4bit-32g with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DSAiLab/KoMultiGen-general-gptq-4bit-32g with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="DSAiLab/KoMultiGen-general-gptq-4bit-32g") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("DSAiLab/KoMultiGen-general-gptq-4bit-32g") model = AutoModelForCausalLM.from_pretrained("DSAiLab/KoMultiGen-general-gptq-4bit-32g", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use DSAiLab/KoMultiGen-general-gptq-4bit-32g with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "DSAiLab/KoMultiGen-general-gptq-4bit-32g" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DSAiLab/KoMultiGen-general-gptq-4bit-32g", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/DSAiLab/KoMultiGen-general-gptq-4bit-32g
- SGLang
How to use DSAiLab/KoMultiGen-general-gptq-4bit-32g with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "DSAiLab/KoMultiGen-general-gptq-4bit-32g" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DSAiLab/KoMultiGen-general-gptq-4bit-32g", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "DSAiLab/KoMultiGen-general-gptq-4bit-32g" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DSAiLab/KoMultiGen-general-gptq-4bit-32g", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use DSAiLab/KoMultiGen-general-gptq-4bit-32g with Docker Model Runner:
docker model run hf.co/DSAiLab/KoMultiGen-general-gptq-4bit-32g
KoMultiGen-General
๋ณธ ๋ชจ๋ธ์ ๋๊ท๋ชจ ํ๊ตญ์ด ๋ฉํฐํด ๋ฐ์ดํฐ์ koVast ํ๋ก์ ํธ์ ์ผ๋ถ๋ก์จ ์ ์๋์์ต๋๋ค.
KoMultiGen-General์ ์๋ํธ๋ผ-๋ฏน์คํธ๋ ๋ชจ๋ธ์ ๊ธฐ๋ฐ์ผ๋ก ์ ์๋์์ต๋๋ค. ๋ณธ ๋ชจ๋ธ์ ์ฃผ์ด์ง ๋น์ ํ ๋ฐ์ดํฐ๋ฅผ ๊ธฐ๋ฐ์ผ๋ก 3~5ํด์ ํ๊ตญ์ด ๋ฉํฐํด ๋ฐ์ดํฐ๋ฅผ ์์ฑํ ์ ์์ต๋๋ค.
Methodology
GPT-4 Turbo๋ฅผ ์ด์ฉํ์ฌ ์์ฑํ ๋ฐ์ดํฐ์ ์ ๊ธฐ๋ฐ์ผ๋ก ๋ชจ๋ธ์ ํ๋ จ์ ์งํํ์์ต๋๋ค. ์ผ๋ฐ์ ์ผ๋ก, ํ๊ตญ์ด ๋ชจ๋ธ๊ณผ์ ์ง์ ์๋ต์ ๊ฒฝ์ฐ์ 'ํด์ฒด'๋ฅผ ์ฌ์ฉํ๋ ๊ฒฝํฅ์ด ๋งค์ฐ ์ง๊ฒ ๋ํ๋จ์ ๋ฐ๋ผ Question์ 'ํด์ฒด'๋ก ๊ตฌ์ฑํ์์ต๋๋ค. ๋ํ, ๋ฐ์ดํฐ๋ฅผ ์์ฑํ๊ธฐ ํ๋ ์ ๋ ฅ์ ๋ํด์๋ ์์ฑํ์ง ์๋ ํ๋จ์ ์ ๋ํจ์ผ๋ก์จ ๋ฐ์ดํฐ ์ ์ ๊ณผ์ ์์์ ์ด๋ ค์์ ์ต์ํํ๊ณ ์ ํ์ต๋๋ค.
Quantization (GPTQ)
์ด ๋ชจ๋ธ์ ์๋ณธ FP16 ๋ชจ๋ธ์ ๊ธฐ๋ฐ์ผ๋ก GPTQ (Groupwise Post-training Quantization) ๊ธฐ๋ฒ์ ํตํด 4bit ์ ๋ฐ๋๋ก ์์ํ ํ์์ต๋๋ค.
- Quantization Type: GPTQ 4bit
- Group Size: 32
- Activation Ordering: Enabled (if applicable)
- Compatibility: vLLM, SGLang ์ง์
- ์ ํ๋ ์์ค: ๋ค์ค ํด QA ๋ฌธ์ฅ ์์ฑ ์ฑ๋ฅ์ ์์ํ ์ ๊ณผ ๋น๊ตํ์ฌ ๋ฏธ๋ฏธํ ์ฐจ์ด ์์ค์ผ๋ก ์ ์ง๋จ
Example
์ผ๋ฐ์ ์ผ๋ก ์๋ ํ๋กฌํํธ๋ฅผ ๋ฐ๋ฆ ๋๋ค.
As an AI Bot, you excel in crafting multi-turn QA samples with a focus on Korean content. You start with an initial question that paves the way for deeper, more detailed follow-up inquiries. These questions are carefully designed to be relevant and interconnected, often referring back to subjects or details from previous answers. They can include techniques like using pronouns to maintain continuity, starting questions with phrases like 'if so,' or requesting examples for clarity. Your answers are expected to be rooted in thorough logical analysis. The dialogue can unfold over 3 to 5 exchanges. If the data provided falls short, you may limit your response to a single turn, or if even that proves challenging, you're to acknowledge the limitation by stating, 'ํด๋นํ๋ ๋ฌธ์ฅ์ ์์ฑํ ์ ์์ต๋๋ค.'
### Instruction:
### Start of provided data
{prompt}
### End of provided data
์ฃผ์ด์ง ๋ฐ์ดํฐ๋ก 3~5 turn์ QA๋ฅผ ์์ฑํด๋ผ.
์ธ์ฉํํ์ ์ฌ์ฉํ์ง ๋ง์์ผํ๋ค.
Question์ ๋งํฌ๋ '~๋ ~์ผ?' ๊ฐ์ ๋ฐ๋ง ์ดํ๋ฅผ ์ฌ์ฉํ๋ฉฐ, Answer๋ '~์
๋๋ค.' ์ดํ๋ฅผ ์ฌ์ฉํ๋ค.
### Response:
- Downloads last month
- 8