[GH-ISSUE #9505] Ollama Not detecting adapter_config.json file #6193

Open
opened 2026-04-12 17:34:10 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @ViswaSrimaan on GitHub (Mar 5, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/9505

What is the issue?

I have built a safetensor file. When I am building in ollama it is not derecting adapter_config.json file. I have built safetensor file from numpy instead of torch.
from safetensors.numpy import save_file

Relevant log output

ollama_exp % ls -ltr
total 392
-rwxrwxrwx  1 user  staff     663 Mar  5 06:31 adapter_config.json
-rw-r--r--  1 user  staff  191700 Mar  5 06:47 frame.safetensors
-rwxrwxrwx  1 user  staff     825 Mar  5 06:57 Modelfile

ollama_exp % ollama create mymodel -f Modelfile           
gathering model components 
copying file sha256:39a66bb611664bd7f0aedbc884304cdcd2c970f79ae8d3e9084e6813dc915e15 100% 
converting adapter 
Error: open adapter_config.json: no such file or directory

ollama_exp % cat Modelfile 
FROM granite3.2:8b

SYSTEM "You are an AI assistant to create test cases."

ADAPTER "/Users/user/ollama_exp/frame.safetensors"

TEMPLATE "User: {{.Input}}\n\nAssistant:"

OS

macOS

GPU

No response

CPU

No response

Ollama version

0.5.13

Originally created by @ViswaSrimaan on GitHub (Mar 5, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/9505 ### What is the issue? I have built a safetensor file. When I am building in ollama it is not derecting adapter_config.json file. I have built safetensor file from numpy instead of torch. from safetensors.numpy import save_file ### Relevant log output ```shell ollama_exp % ls -ltr total 392 -rwxrwxrwx 1 user staff 663 Mar 5 06:31 adapter_config.json -rw-r--r-- 1 user staff 191700 Mar 5 06:47 frame.safetensors -rwxrwxrwx 1 user staff 825 Mar 5 06:57 Modelfile ollama_exp % ollama create mymodel -f Modelfile gathering model components copying file sha256:39a66bb611664bd7f0aedbc884304cdcd2c970f79ae8d3e9084e6813dc915e15 100% converting adapter Error: open adapter_config.json: no such file or directory ollama_exp % cat Modelfile FROM granite3.2:8b SYSTEM "You are an AI assistant to create test cases." ADAPTER "/Users/user/ollama_exp/frame.safetensors" TEMPLATE "User: {{.Input}}\n\nAssistant:" ``` ### OS macOS ### GPU _No response_ ### CPU _No response_ ### Ollama version 0.5.13
GiteaMirror added the bug label 2026-04-12 17:34:10 -05:00
Author
Owner

@LZY-SPCA commented on GitHub (Apr 9, 2025):

I'm facing the same problem. I'm trying to include the lora adapter created by unsloth after finetune. ollama can't find the adapter_config.json.

<!-- gh-comment-id:2788138612 --> @LZY-SPCA commented on GitHub (Apr 9, 2025): I'm facing the same problem. I'm trying to include the lora adapter created by unsloth after finetune. ollama can't find the adapter_config.json.
Author
Owner

@lipej commented on GitHub (Jul 7, 2025):

I was able to use the adapter in Modelfile by typing the path of the folder containing adapter_model.safetensors and adapter_config.json. In your example, you could use:

ADAPTER "/Users/user/ollama_exp"

<!-- gh-comment-id:3045470280 --> @lipej commented on GitHub (Jul 7, 2025): I was able to use the adapter in Modelfile by typing the path of the folder containing `adapter_model.safetensors` and `adapter_config.json`. In your example, you could use: `ADAPTER "/Users/user/ollama_exp"`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#6193