Instructions to use LGAI-EXAONE/EXAONE-3.0-7.8B-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LGAI-EXAONE/EXAONE-3.0-7.8B-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="LGAI-EXAONE/EXAONE-3.0-7.8B-Instruct", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("LGAI-EXAONE/EXAONE-3.0-7.8B-Instruct", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use LGAI-EXAONE/EXAONE-3.0-7.8B-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "LGAI-EXAONE/EXAONE-3.0-7.8B-Instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LGAI-EXAONE/EXAONE-3.0-7.8B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/LGAI-EXAONE/EXAONE-3.0-7.8B-Instruct
- SGLang
How to use LGAI-EXAONE/EXAONE-3.0-7.8B-Instruct 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 "LGAI-EXAONE/EXAONE-3.0-7.8B-Instruct" \ --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": "LGAI-EXAONE/EXAONE-3.0-7.8B-Instruct", "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 "LGAI-EXAONE/EXAONE-3.0-7.8B-Instruct" \ --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": "LGAI-EXAONE/EXAONE-3.0-7.8B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use LGAI-EXAONE/EXAONE-3.0-7.8B-Instruct with Docker Model Runner:
docker model run hf.co/LGAI-EXAONE/EXAONE-3.0-7.8B-Instruct
support ollama ??
i coverted this to .gguf file or used another link .gguf file
but do not support in ollama (version 0.3.8)
ollama create : success
ollama run : failed
Here is simple guidelines for using the EXAONE model on ollama:
Download the EXAONE model from HuggingFace, and save to /path/to/LGAI-EXAONE/EXAONE-3.0-7.8B-Instruct.
Llamafy the EXAONE model by referring to the followings.
- maywell/EXAONE-3.0-7.8B-Instruct-Llamafied
- CarrotAI/EXAONE-3.0-7.8B-Instruct-Llamafied-cpuCreate the EXAONE Modelfile. See https://github.com/ollama/ollama/blob/main/docs/modelfile.md for more information. This is an example of the EXAONE Modelfile.
# Set the base model.
FROM /path/to/LGAI-EXAONE/EXAONE-3.0-7.8B-Instruct-Llamafied
# Set the parameter values according to your application.
PARAMETER stop "[|endofturn|]"
PARAMETER num_predict -2
PARAMETER top_k 1
# Set the template.
TEMPLATE """{{ if .System }}[|system|]{{ .System }}[|endofturn|]
{{ end }}{{ if .Prompt }}[|user|]{{ .Prompt }}
{{ end }}[|assistant|]{{ .Response }}[|endofturn|]
"""
# Set the system prompt.
SYSTEM """You are EXAONE model from LG AI Research, a helpful assistant."""
# Set the license.
LICENSE """EXAONE AI Model License Agreement 1.1 - NC """
- Convert the EXAONE model saved as pyTorch safetensors to ollama. To quantize the EXAONE model, you can add --quantize flag. Please refer to https://github.com/ollama/ollama/blob/main/docs/import.md for the quantization flag.
$ ollama create exaone3 -f <the EXAONE Modelfile>
Good luck to you.
@yireun Thank you for your reply. But when I tried
Again, the following message occurs.
ollama create : ok
ollama run : failed
"Error: llama runner process has terminated: this model is not supported by your version of Ollama. You may need to upgrade"
I think the llama.cpp library inside ollama should be updated.
Would you check your path again?
According to https://github.com/ollama/ollama/blob/4a8069f9c4c8cb761cd6c10ca5f4be6af21fa0ae/cmd/cmd.go#L222,
the error "Error: no safetensors or torch files found" occurs when ollama cannot find files "model*.safetensors".
When I used the maywell/EXAONE-3.0-7.8B-Instruct-Llamafied weights, no errors occurred.
If you use an ollama docker container, those two paths should point the paths in container.
- FROM <the EXAONE-Llamafied model path>
- $ ollama create exaone3 -f <the EXAONE Modelfile>
Good luck to you.
Thank you for your help!
my mistake Modelfile Path
I succeeded in loading the ollama EXAONE
ollama create -q q4_K_M EXAONE-3.0 -f EXAONE-3.0-7.8B-Instruct-Llamafied/Modelfile
ollama run EXAONE-3.0:latest
μλ
νμΈμ
@yireun
νΉμ μμ¬μμ μ¬λΌλ§μ μ¬λ €μ μ¬μ©μ ν΄μ νΈμΆν μ μλModelfile(ν νλ¦Ώ)λ μλμ?
