The Q4_K_M quantized version of dmeta-embedding-zh.

embedding

228 7 months ago

7 months ago

4b69498e5783 · 70MB

model
bert
·
102M
·
Q4_K_M

Readme

Note: this model requires Ollama 0.1.30 or later. It can only be used to generate embeddings.

shaw/dmeta-embedding-zh-q4 is a quantized version of the dmeta-embedding-zh model.

Usage

This model is an embedding model, meaning it can only be used to generate embeddings.

You should pull this model into local disk first as following:

ollama pull shaw/dmeta-embedding-zh-q4

Then you can call the ollama embedding api via the following methods.

REST API

curl http://localhost:11434/api/embeddings -d '{
  "model": "shaw/dmeta-embedding-zh-q4",
  "prompt": "天空是灰色的"
}'

Python library

ollama.embeddings(model='shaw/dmeta-embedding-zh-q4', prompt='天空是灰色的')

Javascript library

ollama.embeddings({ model: 'shaw/dmeta-embedding-zh-q4', prompt: '天空是灰色的' })

Java library

EmbeddingResponse embeddingResponse = embeddingClient.call(
    new EmbeddingRequest(List.of("天空是灰色的", "天空是蓝色的"),
        OllamaOptions.create()
            .withModel("shaw/dmeta-embedding-zh-q4"));

More Docs