[GH-ISSUE #9315] How can I run the text embedding API offline? #68134

Closed
opened 2026-05-04 12:36:54 -05:00 by GiteaMirror · 13 comments
Owner

Originally created by @yukon12345 on GitHub (Feb 24, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/9315

I used the command
ollama pull shaw/dmeta-embedding-zh
to download a text embedding model.
It has been successfully run and can provide API services for access.
However, how can I start this API service when the computer just powered on in an offline state?

Originally created by @yukon12345 on GitHub (Feb 24, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/9315 I used the command `ollama pull shaw/dmeta-embedding-zh` to download a text embedding model. It has been successfully run and can provide API services for access. However, how can I start this API service when the computer just powered on in an offline state?
Author
Owner

@rick-github commented on GitHub (Feb 24, 2025):

Do you mean how do you run shaw/dmeta-embedding-zh if the server is not connected to the internet? You download the model and copy it to the model directory on the server.

<!-- gh-comment-id:2678507385 --> @rick-github commented on GitHub (Feb 24, 2025): Do you mean how do you run `shaw/dmeta-embedding-zh` if the server is not connected to the internet? You download the model and copy it to the [model directory](https://github.com/ollama/ollama/blob/main/docs/faq.md#where-are-models-stored) on the server.
Author
Owner

@yukon12345 commented on GitHub (Feb 25, 2025):

Do you mean how do you run shaw/dmeta-embedding-zh if the server is not connected to the internet? You download the model and copy it to the model directory on the server.

Thank you for your replying.
I mean,I had previously downloaded the model shaw/dmeta-embedding-zh through thepullcommand.
It has been successfully run and can provide API services for access.
But now, when I disconnect this server machine from the Internet, what command should I use to restart it?
If I use theollama run shaw/dmeta-embedding-zh command,
it will report an error:shaw/dmeta-embedding-zh does not support generate
if I use the ollama pull shaw/dmeta-embedding-zh command ,
it will report an error: dialtcp:lookup registry.ollama.ai on 127.0.0.53:53:server misbehaving
I read the ollama docs and asked quite a few AIs, but none of them could provide the answer.

<!-- gh-comment-id:2680203450 --> @yukon12345 commented on GitHub (Feb 25, 2025): > Do you mean how do you run `shaw/dmeta-embedding-zh` if the server is not connected to the internet? You download the model and copy it to the [model directory](https://github.com/ollama/ollama/blob/main/docs/faq.md#where-are-models-stored) on the server. Thank you for your replying. I mean,I had previously downloaded the model shaw/dmeta-embedding-zh through the` pull `command. It has been successfully run and can provide API services for access. But now, when I disconnect this server machine from the Internet, what command should I use to restart it? If I use the`ollama run shaw/dmeta-embedding-zh` command, it will report an error:**shaw/dmeta-embedding-zh does not support generate** if I use the `ollama pull shaw/dmeta-embedding-zh` command , it will report an error: **dialtcp:lookup registry.ollama.ai on 127.0.0.53:53:server misbehaving** I read the ollama docs and asked quite a few AIs, but none of them could provide the answer.
Author
Owner

@rick-github commented on GitHub (Feb 25, 2025):

shaw/dmeta-embedding-zh is an embedding model, you can't use run to load it. Your client needs to send an API call:

$ curl localhost:11434/api/embed -d '{"model":"shaw/dmeta-embedding-zh","input":"make an embedding"}'
{"model":"shaw/dmeta-embedding-zh","embeddings":[[0.0023328515,-0.002045153 ... ]]}
<!-- gh-comment-id:2681501042 --> @rick-github commented on GitHub (Feb 25, 2025): shaw/dmeta-embedding-zh is an embedding model, you can't use `run` to load it. Your client needs to send an API call: ```console $ curl localhost:11434/api/embed -d '{"model":"shaw/dmeta-embedding-zh","input":"make an embedding"}' {"model":"shaw/dmeta-embedding-zh","embeddings":[[0.0023328515,-0.002045153 ... ]]} ```
Author
Owner

@yukon12345 commented on GitHub (Feb 25, 2025):

shaw/dmeta-embedding-zh is an embedding model, you can't use run to load it. Your client needs to send an API call:

$ curl localhost:11434/api/embed -d '{"model":"shaw/dmeta-embedding-zh","input":"make an embedding"}'
{"model":"shaw/dmeta-embedding-zh","embeddings":0.0023328515,-0.002045153 ... }

I used the command provided above by you.
The error message is displayed as model not found ,try pulling it first
if I use the ollama pull shaw/dmeta-embedding-zh command ,
it will report an error: dialtcp:lookup registry.ollama.ai on 127.0.0.53:53:server misbehaving
There is nothing when I use ollama ps to list which models are currently loaded
how can I start the model running ?

<!-- gh-comment-id:2681927638 --> @yukon12345 commented on GitHub (Feb 25, 2025): > shaw/dmeta-embedding-zh is an embedding model, you can't use `run` to load it. Your client needs to send an API call: > > $ curl localhost:11434/api/embed -d '{"model":"shaw/dmeta-embedding-zh","input":"make an embedding"}' > {"model":"shaw/dmeta-embedding-zh","embeddings":[[0.0023328515,-0.002045153 ... ]]} I used the command provided above by you. The error message is displayed as **model not found ,try pulling it first** if I use the `ollama pull shaw/dmeta-embedding-zh command `, it will report an error: **dialtcp:lookup registry.ollama.ai on 127.0.0.53:53:server misbehaving** There is nothing when I use` ollama ps` to list which models are currently loaded how can I start the model running ?
Author
Owner

@rick-github commented on GitHub (Feb 25, 2025):

You need to copy the model to your server. What does the following show:

ollama list
<!-- gh-comment-id:2681945178 --> @rick-github commented on GitHub (Feb 25, 2025): You need to copy the model to your server. What does the following show: ``` ollama list ```
Author
Owner

@yukon12345 commented on GitHub (Feb 25, 2025):

Im quite sure the model is in the list.Every time I need to enter the model name, I copy the result from the list command. :)

<!-- gh-comment-id:2681969971 --> @yukon12345 commented on GitHub (Feb 25, 2025): Im quite sure the model is in the list.Every time I need to enter the model name, I copy the result from the list command. :)
Author
Owner

@yukon12345 commented on GitHub (Feb 25, 2025):

If I connect internet and use ollama pull shaw/dmeta-embedding-zh,it will start running the model .but when I disconnect the network and reboot the sever ,There is no way to start the model running :(

<!-- gh-comment-id:2681988342 --> @yukon12345 commented on GitHub (Feb 25, 2025): If I connect internet and use` ollama pull shaw/dmeta-embedding-zh`,it will start running the model .but when I disconnect the network and reboot the sever ,There is no way to start the model running :(
Author
Owner

@rick-github commented on GitHub (Feb 25, 2025):

Im quite sure the model is in the list.Every time I need to enter the model name, I copy the result from the list command. :)

Then show the result of ollama list.

If I connect internet and use ollama pull shaw/dmeta-embedding-zh,it will start running the model

ollama pull shaw/dmeta-embedding-zh doesn't start running the model, it pulls it from the repo.

but when I disconnect the network and reboot the sever ,There is no way to start the model running :(

If the model has been pulled when the server was connected, and is currently on the server (as shown in ollama list), then in order to use the model, you client needs to send an API call with the name of the model in the model field. If the model is on the server and the client gets a model not found ,try pulling it first error, you are sending the wrong model name.

<!-- gh-comment-id:2682005114 --> @rick-github commented on GitHub (Feb 25, 2025): > Im quite sure the model is in the list.Every time I need to enter the model name, I copy the result from the list command. :) Then show the result of `ollama list`. > If I connect internet and use `ollama pull shaw/dmeta-embedding-zh`,it will start running the model `ollama pull shaw/dmeta-embedding-zh` doesn't start running the model, it pulls it from the repo. > but when I disconnect the network and reboot the sever ,There is no way to start the model running :( If the model has been pulled when the server was connected, and is currently on the server (as shown in `ollama list`), then in order to use the model, you client needs to send an API call with the name of the model in the `model` field. If the model is on the server and the client gets a `model not found ,try pulling it first` error, you are sending the wrong model name.
Author
Owner

@yukon12345 commented on GitHub (Feb 25, 2025):

I mean I reboot the server operation system and disconnect the network,how can I start the text embeding model

<!-- gh-comment-id:2682095055 --> @yukon12345 commented on GitHub (Feb 25, 2025): I mean I reboot the server operation system and disconnect the network,how can I start the text embeding model
Author
Owner

@rick-github commented on GitHub (Feb 25, 2025):

Your client needs to make an API call with the name of the model in the model field.

<!-- gh-comment-id:2682100380 --> @rick-github commented on GitHub (Feb 25, 2025): Your client needs to make an API call with the name of the model in the model field.
Author
Owner

@yukon12345 commented on GitHub (Feb 25, 2025):

Your client needs to make an API call with the name of the model in the model field.

When the operation system restart, this model is not running.I know how to call with API.But first of all,I have to make this model running at the
Sever.

<!-- gh-comment-id:2682113999 --> @yukon12345 commented on GitHub (Feb 25, 2025): > Your client needs to make an API call with the name of the model in the model field. When the operation system restart, this model is not running.I know how to call with API.But first of all,I have to make this model running at the Sever.
Author
Owner

@rick-github commented on GitHub (Feb 25, 2025):

The model is loaded when the client makes an API call with the name of the model in the model field.

<!-- gh-comment-id:2682116906 --> @rick-github commented on GitHub (Feb 25, 2025): The model is loaded when the client makes an API call with the name of the model in the `model` field.
Author
Owner

@yukon12345 commented on GitHub (Feb 25, 2025):

The model is loaded when the client makes an API call with the name of the model in the model field.

OK.I try it again with
The name
shaw/dmeta-embedding-zh:latest
This works.OMG!Σ(ŎдŎ|||)ノノ
I really appreciate your help.
▄█▀█●

<!-- gh-comment-id:2682138262 --> @yukon12345 commented on GitHub (Feb 25, 2025): > The model is loaded when the client makes an API call with the name of the model in the `model` field. OK.I try it again with The name shaw/dmeta-embedding-zh:latest This works.OMG!Σ(ŎдŎ|||)ノノ I really appreciate your help. ▄█▀█●
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#68134