support ollama ??

#14
by skju - opened

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

LG AI Research org
β€’
edited Sep 9

Here is simple guidelines for using the EXAONE model on ollama:

  1. Download the EXAONE model from HuggingFace, and save to /path/to/LGAI-EXAONE/EXAONE-3.0-7.8B-Instruct.

  2. 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-cpu

  3. Create 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 """
  1. 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.

LG AI Research org

@skju
Sorry, I missed the step of llamafying the EXAONE model.
I updated above posted guidelines. Would you try again?

Thank you , but ....γ…œ.γ…œ
I received the "maywell/EXAONE-3.0-7.8B-Instruct-Llamafied" weights
image.png

but
I got a error message.
Error: no safetensors or torch files found

The files are already there, also Modelfile path is right!

please make a gguf file for ollama

LG AI Research org

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

Sign up or log in to comment