Efficient and Effective Vocabulary Expansion Towards Multilingual Large Language Models
Paper • 2402.14714 • Published • 4
How to use teddylee777/EEVE-Korean-Instruct-10.8B-v1.0-gguf with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="teddylee777/EEVE-Korean-Instruct-10.8B-v1.0-gguf")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("teddylee777/EEVE-Korean-Instruct-10.8B-v1.0-gguf")
model = AutoModelForCausalLM.from_pretrained("teddylee777/EEVE-Korean-Instruct-10.8B-v1.0-gguf")
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=40)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))How to use teddylee777/EEVE-Korean-Instruct-10.8B-v1.0-gguf with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="teddylee777/EEVE-Korean-Instruct-10.8B-v1.0-gguf", filename="EEVE-Korean-Instruct-10.8B-v1.0-FP16.gguf", )
llm.create_chat_completion(
messages = [
{
"role": "user",
"content": "What is the capital of France?"
}
]
)How to use teddylee777/EEVE-Korean-Instruct-10.8B-v1.0-gguf with llama.cpp:
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf teddylee777/EEVE-Korean-Instruct-10.8B-v1.0-gguf:Q4_K_M # Run inference directly in the terminal: llama-cli -hf teddylee777/EEVE-Korean-Instruct-10.8B-v1.0-gguf:Q4_K_M
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf teddylee777/EEVE-Korean-Instruct-10.8B-v1.0-gguf:Q4_K_M # Run inference directly in the terminal: llama-cli -hf teddylee777/EEVE-Korean-Instruct-10.8B-v1.0-gguf:Q4_K_M
# 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 teddylee777/EEVE-Korean-Instruct-10.8B-v1.0-gguf:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf teddylee777/EEVE-Korean-Instruct-10.8B-v1.0-gguf:Q4_K_M
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 teddylee777/EEVE-Korean-Instruct-10.8B-v1.0-gguf:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf teddylee777/EEVE-Korean-Instruct-10.8B-v1.0-gguf:Q4_K_M
docker model run hf.co/teddylee777/EEVE-Korean-Instruct-10.8B-v1.0-gguf:Q4_K_M
How to use teddylee777/EEVE-Korean-Instruct-10.8B-v1.0-gguf with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "teddylee777/EEVE-Korean-Instruct-10.8B-v1.0-gguf"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "teddylee777/EEVE-Korean-Instruct-10.8B-v1.0-gguf",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/teddylee777/EEVE-Korean-Instruct-10.8B-v1.0-gguf:Q4_K_M
How to use teddylee777/EEVE-Korean-Instruct-10.8B-v1.0-gguf with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "teddylee777/EEVE-Korean-Instruct-10.8B-v1.0-gguf" \
--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": "teddylee777/EEVE-Korean-Instruct-10.8B-v1.0-gguf",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'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 "teddylee777/EEVE-Korean-Instruct-10.8B-v1.0-gguf" \
--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": "teddylee777/EEVE-Korean-Instruct-10.8B-v1.0-gguf",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use teddylee777/EEVE-Korean-Instruct-10.8B-v1.0-gguf with Ollama:
ollama run hf.co/teddylee777/EEVE-Korean-Instruct-10.8B-v1.0-gguf:Q4_K_M
How to use teddylee777/EEVE-Korean-Instruct-10.8B-v1.0-gguf with Unsloth Studio:
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 teddylee777/EEVE-Korean-Instruct-10.8B-v1.0-gguf to start chatting
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 teddylee777/EEVE-Korean-Instruct-10.8B-v1.0-gguf to start chatting
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for teddylee777/EEVE-Korean-Instruct-10.8B-v1.0-gguf to start chatting
How to use teddylee777/EEVE-Korean-Instruct-10.8B-v1.0-gguf with Docker Model Runner:
docker model run hf.co/teddylee777/EEVE-Korean-Instruct-10.8B-v1.0-gguf:Q4_K_M
How to use teddylee777/EEVE-Korean-Instruct-10.8B-v1.0-gguf with Lemonade:
# Download Lemonade from https://lemonade-server.ai/ lemonade pull teddylee777/EEVE-Korean-Instruct-10.8B-v1.0-gguf:Q4_K_M
lemonade run user.EEVE-Korean-Instruct-10.8B-v1.0-gguf-Q4_K_M
lemonade list
Modelfile
FROM EEVE-Korean-Instruct-10.8B-v1.0-Q8_0.gguf
TEMPLATE """{{- if .System }}
<s>{{ .System }}</s>
{{- end }}
<s>Human:
{{ .Prompt }}</s>
<s>Assistant:
"""
SYSTEM """A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions."""
PARAMETER temperature 0
PARAMETER num_predict 3000
PARAMETER num_ctx 4096
PARAMETER stop <s>
PARAMETER stop </s>
@misc{kim2024efficient,
title={Efficient and Effective Vocabulary Expansion Towards Multilingual Large Language Models},
author={Seungduk Kim and Seungtaek Choi and Myeongho Jeong},
year={2024},
eprint={2402.14714},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
@misc{cui2023ultrafeedback,
title={UltraFeedback: Boosting Language Models with High-quality Feedback},
author={Ganqu Cui and Lifan Yuan and Ning Ding and Guanming Yao and Wei Zhu and Yuan Ni and Guotong Xie and Zhiyuan Liu and Maosong Sun},
year={2023},
eprint={2310.01377},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
@misc{SlimOrcaDedup,
title = {SlimOrca Dedup: A Deduplicated Subset of SlimOrca},
author = {Wing Lian and Guan Wang and Bleys Goodson and Eugene Pentland and Austin Cook and Chanvichet Vong and "Teknium" and Nathan Hoos},
year = {2023},
publisher = {HuggingFace},
url = {https://huggingface.co/datasets/Open-Orca/SlimOrca-Dedup/}
}
@misc{mukherjee2023orca,
title={Orca: Progressive Learning from Complex Explanation Traces of GPT-4},
author={Subhabrata Mukherjee and Arindam Mitra and Ganesh Jawahar and Sahaj Agarwal and Hamid Palangi and Ahmed Awadallah},
year={2023},
eprint={2306.02707},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
Base model
upstage/SOLAR-10.7B-v1.0