轩辕镜像 官方专业版
轩辕镜像
专业版
轩辕镜像 官方专业版
轩辕镜像
专业版
首页个人中心搜索镜像
交易
充值流量¥7起我的订单
文档
工具
提交工单页面收录
nomic-embed-v1.5

mindthemath/nomic-embed-v1.5

mindthemath

monolithic API written in rust for nomic-embed-v1.5, capable of embedding both images and text

下载次数: 0状态:社区镜像维护者:mindthemath仓库类型:镜像最近更新:5 个月前
让 AI 帮你使用轩辕镜像? · 展开查看说明 · 点击收起说明

如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。

只需在 AI 对话中先发送下面这句话即可:

请先完整阅读并严格遵守以下文档中的全部规则与要求:

https://xuanyuan.cloud/agents.md

在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。

查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。

镜像简介
下载命令
镜像标签列表与下载命令
轩辕镜像,不浪费每一次拉取。
点击查看

source code: https://github.com/mindthemath/nomic-api-rs

nomic-serve

A fast Rust server for generating text and image embeddings using https://huggingface.co/nomic-ai/nomic-embed-text-v1.5 and https://huggingface.co/nomic-ai/nomic-embed-vision-v1.5 models via ONNX Runtime.

Quick Start

Pick either the cpu or gpu tag (adding --gpus all for the latter), and start the server with:

bash
docker run --rm -p 8080:8080 mindthemath/nomic-embed-v1.5:cpu
# Test
curl -X POST localhost:8080/embed \
  -H 'content-type: application/json' \
  -d '{"input": "Hello world"}'

There are also :..-quantizeed variants of the images which ship with smaller model artifacts at the cost of reduced precision.

API

Interactive documentation available at /docs (Swagger UI).

GET /health

Returns health status and model availability.

Response:

json
{
  "status": "OK",
  "text_model": true,
  "vision_model": true
}

GET /info

Returns server information including model paths and configuration.

Response:

json
{
  "averaging": "geometric",
  "load_cuda": false,
  "txt_model": "models/txt/model_quantized.onnx",
  "tokenizer": "models/txt/tokenizer.json",
  "img_model": "models/img/model_quantized.onnx"
}

POST /embed (or /txt/embed)

Generate embedding for a single text.

Request:

json
{"input": "Hello world", "dim": 768}
  • input (required): Text to embed
  • dim (optional): Embedding dimension (1-768). Defaults to 768. Supports https://huggingface.co/blog/matryoshka - use smaller dimensions for faster similarity search.

Response:

json
{
  "embedding": [0.123, 0.456, ...],
  "tokens": 4,
  "time_ms": 12.34
}

Example with reduced dimension:

json
{"input": "Hello world", "dim": 128}

Returns a 128-dimensional embedding (faster similarity search, slightly lower quality).

POST /batch (or /txt/batch)

Generate embeddings for multiple texts.

Request:

json
{"inputs": ["Hello world", "Goodbye world"], "dim": 8}
  • inputs (required): List of texts to embed
  • dim (optional): Embedding dimension (1-768). Defaults to 768. Applied to all embeddings in the batch.

Response:

json
{
  "embeddings": [[0.123, 0.456, ...], [0.789, -0.123, ...]],
  "tokens": [4, 5],
  "time_ms": 45.67
}

POST /img/embed

Generate embedding for a single image.

Request:

json
{
  "content": "https://example.com/image.jpg",
  "dim": 768
}
  • content (required): Image as URL, data URL (data:image/jpeg;base64,...), or raw base64
  • dim (optional): Embedding dimension (1-768). Defaults to 768.

Response:

json
{
  "embedding": [0.123, 0.456, ...],
  "time_ms": 89.12
}

Limits: Maximum 20MB per image (compressed). Supports JPEG, PNG, GIF, WebP, BMP, TIFF.

POST /img/batch

Generate embeddings for multiple images.

Request:

json
{
  "contents": [
    "https://example.com/cat.jpg",
    "data:image/png;base64,iVBORw0KGgo..."
  ],
  "dim": 768
}

Response:

json
{
  "embeddings": [[0.123, ...], [0.789, ...]],
  "time_ms": 178.45
}

POST /img/stats

Extract image statistics including EXIF metadata and color analysis.

Request:

json
{
  "content": "https://example.com/image.jpg",
  "averaging_method": "geometric"
}
  • content (required): Image as URL, data URL (data:image/jpeg;base64,...), or raw base64
  • averaging_method (optional): Color averaging method - arithmetic or geometric (defaults to AVERAGING env var or geometric)

Response:

json
{
  "exif_data": {
    "Make": "Canon",
    "Model": "EOS 5D",
    "DateTime": "2024:01:01 12:00:00"
  },
  "color_data": {
    "avg_color": {
      "rgb": [0.5, 0.3, 0.2],
      "hex": "#804d33",
      "method": "geometric"
    },
    "dominant_color": {
      "rgb": [0.6, 0.4, 0.3],
      "hex": "#99664d"
    }
  },
  "time_ms": 12.34
}

Limits: Maximum 20MB per image (compressed). Supports JPEG, PNG, GIF, WebP, BMP, TIFF.

GET /docs

Swagger UI documentation page.

GET /openapi.json

OpenAPI 3.1.0 schema.

Configuration

VariableDefaultDescription
PORT8080Server port
MODELmodels/txt/model_quantized.onnxPath to text ONNX model (fallback for TXT_MODEL)
TXT_MODELmodels/txt/model_quantized.onnxPath to text ONNX model
TOKENIZERmodels/txt/tokenizer.jsonPath to tokenizer
IMG_MODELmodels/img/model_quantized.onnxPath to vision ONNX model
USE_GPUfalseEnable GPU inference (1 or true)
AVERAGINGgeometricDefault averaging method for image color statistics: arithmetic or geometric
DISABLE_CORSfalseDisable CORS entirely (1 or true)
CORS_ORIGINS(see below)Comma-separated list of allowed origins

CORS Configuration

By default, the server allows requests from localhost only (for local development):

  • http://localhost:3000 / http://localhost:8080
  • http://127.0.0.1:3000 / http://127.0.0.1:8080

Production deployment - set allowed origins explicitly:

bash
# Allow specific origins (comma-separated, no wildcards)
CORS_ORIGINS="https://example.com,https://app.example.com,https://api.example.com" ./nomic-serve

# Docker
docker run -p 8080:8080 \
  -e CORS_ORIGINS="https://example.com,https://app.example.com" \
  mindthemath/nomic-text-v1.5-rs:latest-cpu

Security notes:

  • Origins must be explicitly listed (no wildcard support)
  • If CORS_ORIGINS is set but contains invalid values, falls back to localhost defaults (never permissive)
  • Invalid origins are silently ignored and logged

Disable CORS entirely (allows all origins - use only for internal APIs):

bash
DISABLE_CORS=1 ./nomic-serve

To modify the default allowed origins, edit DEFAULT_CORS_ORIGINS in src/main.rs.


Matryoshka Embeddings

The nomic-embed-text-v1.5 model supports Matryoshka embeddings - variable-dimension embeddings that maintain quality at reduced dimensions. Use the dim parameter to truncate embeddings for faster similarity search.

Benefits:

  • Faster similarity search: Smaller vectors = faster distance calculations
  • Reduced storage: Store fewer dimensions per embedding
  • Quality preserved: Lower dimensions maintain high quality for most use cases

Recommended dimensions:

  • 768 (default): Full quality, best for fine-grained tasks
  • 512: ~99% quality, good balance
  • 256: ~95% quality, faster search
  • 128: ~90% quality, very fast search
  • 64: ~85% quality, fastest search

Example:

bash
# Full dimension (default)
curl -X POST localhost:8080/embed \
  -H 'content-type: application/json' \
  -d '{"input": "Hello world"}'

# Reduced dimension for faster search
curl -X POST localhost:8080/embed \
  -H 'content-type: application/json' \
  -d '{"input": "Hello world", "dim": 128}'

Important: All embeddings in a batch use the same dim value. For consistent similarity search, always use the same dim for all embeddings you compare.

Model Architecture

According to the https://static.nomic.ai/reports/2024_Nomic_Embed_Text_Technical_Report.pdf:

  • Base architecture: BERT-based encoder with 137M parameters
  • Context length: 8,192 tokens (extended from standard 512)
  • Training: Multi-stage contrastive learning with 235M text pairs
  • Features: Matryoshka Representation Learning for variable-dimension embeddings

Note: The model architecture itself supports batching (proven by FP32 and PyTorch implementations). The interference is specific to ONNX quantized models.

Why This Matters

For most embedding use cases (similarity search, clustering, RAG), embeddings need to be deterministic — the same text should always produce the same embedding. Cross-sample interference violates this:

embed("hello") alone     → [0.123, 0.456, ...]
embed("hello") + "world" → [0.089, 0.512, ...]  # Different!

This could cause:

  • Inconsistent search results depending on what else was in the batch
  • Non-reproducible experiments
  • Subtle bugs that are hard to diagnose

Sequential Processing is Correct (for Quantized Model)

By processing each text individually (batch_size=1) with the quantized model, we guarantee:

  • Deterministic results: Same text → same embedding, always
  • No cross-sample interference: Each text processed in isolation
  • Correctness over speed: Throughput is lower, but results are reliable

Alternative: Use FP32 Model for Batching

If you need batching for text embeddings:

  • Use FP32 model (model.onnx instead of model_quantized.onnx)
  • FP32 batches perfectly (0.000000 difference, cosine similarity = 1.0)
  • Trade-off: Larger model size (~375MB vs ~131MB) but enables batching

Dependencies

CPU inference: Standard C libraries (glibc, libstdc++). No GPU drivers or CUDA needed.

GPU inference: NVIDIA CUDA drivers and CUDA toolkit. The ***ary is built with CUDA support enabled by default (can be disabled by removing "cuda" feature from Cargo.toml).

Docker

Note: The --dns flags are recommended for image embedding endpoints (/img/embed, /img/batch) to ensure fast DNS resolution. Cloudflare DNS (1.1.1.1) is used for privacy and performance. Without DNS configuration, image URL fetching may be slow (10+ seconds) due to Docker's default DNS configuration.

Image Size (as shown by docker images):

  • CPU image: ~358MB
    • ***ary: 38MB
    • Text model files (model_quantized.onnx + tokenizer.json): 132MB
    • Vision model (model_quantized.onnx): 93MB
    • Base image (debian:bookworm-slim): 74.8MB
    • Runtime dependencies (ca-certificates, libssl3, dumb-init): 9.2MB
    • Layer compression overhead: ~12MB
  • GPU image: ~2.7GB
    • ***ary: 38MB
    • Text model files (model_quantized.onnx + tokenizer.json): 132MB
    • Vision model (model_quantized.onnx): 93MB
    • ONNX Runtime CUDA providers libraries: 196MB
    • CUDA runtime base image (nvidia/cuda:12.1.0-runtime-ubuntu22.04): 2.23GB
    • Runtime dependencies: 8MB
    • Layer compression overhead: ~100MB
    • Note: The -runtime variant is required (not -base) as it includes CUDA runtime libraries needed by ONNX Runtime's CUDA execution provider. The ONNX Runtime CUDA providers add significant size but are required for GPU inference.

Note: The CPU Docker image includes both text and vision models for full multimodal support. The GPU image is significantly larger due to the CUDA runtime base image (~2.23GB) required for GPU inference.

Model Info

Text Model:

  • Model: https://huggingface.co/nomic-ai/nomic-embed-text-v1.5
  • Embedding dimension: 768
  • Max sequence length: 8,192 tokens
  • Pooling: Mean pooling over non-padding tokens

Vision Model:

  • Model: https://huggingface.co/nomic-ai/nomic-embed-vision-v1.5
  • Embedding dimension: 768
  • Input size: 224×224 (auto-resized)
  • Pooling: CLS token extraction

Both models share the same embedding space via contrastive training, enabling direct comparison of text and image embeddings.

License: Apache 2.0

References

  • https://static.nomic.ai/reports/2024_Nomic_Embed_Text_Technical_Report.pdf
  • https://www.nomic.ai/blog/posts/nomic-embed-text-v1
  • https://huggingface.co/nomic-ai/nomic-embed-text-v1.5
  • https://huggingface.co/nomic-ai/nomic-embed-vision-v1.5

License

MIT

镜像拉取方式

您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。

轩辕镜像加速拉取命令点我查看更多 nomic-embed-v1.5 镜像标签

docker pull docker.xuanyuan.run/mindthemath/nomic-embed-v1.5:<标签>

使用方法:

  • 登录认证方式
  • 免认证方式

DockerHub 原生拉取命令

docker pull mindthemath/nomic-embed-v1.5:<标签>

轩辕镜像配置手册

按平台快速找到配置文档

一键安装

一键安装 Docker

Linux Docker 一键安装

AI

用 AI 使用轩辕镜像

agents.md · AI 对话 · 提示词

Docker

登录仓库拉取

登录认证 · 私有仓库

专属域名拉取

免登录 · 高速拉取

Linux

Docker 镜像配置

Windows / Mac

Docker Desktop 配置

MacOS OrbStack

OrbStack 容器

Apple Container

macOS 原生容器

Docker Compose

Compose 项目配置

NAS

群晖

Synology 配置

飞牛

fnOS 镜像配置

绿联

绿联 NAS

威联通

QNAP 配置

极空间

极空间 NAS

Unraid

Unraid NAS

企业仓库

其他仓库

ghcr · Quay · nvcr

Harbor 镜像源

Proxy Repository 对接

Portainer 镜像源

Registries 配置

Nexus 镜像源

Docker Proxy 缓存

开发工具

Dev Containers

VS Code 开发容器

Podman

Podman 配置指南

Singularity / Apptainer

HPC 科学计算容器

Kubernetes

K8s Containerd

Kubernetes · Containerd

K3s

轻量级集群

面板 / 网络

爱快路由

iKuai 镜像加速

宝塔面板

一键配置镜像源

需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单

镜像拉取常见问题

功能

版本功能对比

功能对比 · 版本选择

支持的镜像仓库

Docker Hub · GCR · GHCR

新手拉取配置

登录 · 专属域名 · 配置

docker search 限制

专属域名 · Hub 搜索

不支持 push

仅支持 pull · 不支持

拉取速度原因

带宽 · 缓存 · 冷热镜像

错误码

402 与流量用尽

402 · 流量包 · 充值

401 认证失败

401 · docker login

manifest unknown

标签错误 · 镜像不存在

410 Gone 排查

410 · Docker 升级

429 限流

免费版 · 专业版 · 企业版 · 请求频率

其他报错

DNS 超时

DNS 解析 · 网络超时

TLS 证书失败

no matching manifest(架构)

账号

失败是否计费

manifest · blob · 计费

申请开发票(企业 / 个人)

企业 · 个人 · 工单

修改登录密码

网站 · 仓库 · 重置

注销账户

工单 · 数据 · 注销

原理

mirrors 不生效

daemon.json · 重启

去掉域名前缀

docker tag · 重命名

指定架构拉取

ARM64 · AMD64 · 多架构

latest 与「最新」

digest · 版本号 · 标签

查看全部问题→

用户好评

来自真实用户的反馈,见证轩辕镜像的优质服务

用户头像

oldzhang

运维工程师

Linux服务器

5

"Docker访问体验非常流畅,大镜像也能快速完成下载。"

轩辕镜像
镜像详情
...
mindthemath/nomic-embed-v1.5
定价查看流量套餐与价格
博客Docker 镜像公告与技术博客
专业版 · 高速稳定拉取镜像
高速镜像下载·在线技术支持·99.95% SLA 保障·付费会员免广告
50GB 仅 ¥7/年
专业版 · 高速稳定拉取镜像
50GB 仅 ¥7/年
高速镜像下载·在线技术支持·99.95% SLA 保障·付费会员免广告
用户协议·隐私政策·增值电信业务经营许可证:浙B2-20261007·©2024-2026 源码跳动©2024-2026 杭州源码跳动科技有限公司·商务合作:点击复制邮箱

更多 nomic-embed-v1.5 镜像推荐

ai/nomic-embed-text-v1.5 logo

ai/nomic-embed-text-v1.5

Docker AI 官方镜像
Nomic Embed Text v1是一款开源、完全可审计的文本嵌入模型,具备8192 token的上下文窗口,在多种嵌入基准测试中表现优于OpenAI Ada-002等模型,提供开放权重、训练代码和数据,适用于长上下文场景的语义搜索、聚类及可审计嵌入管道。
4 次收藏1万+ 次下载
1 个月前更新
ai/nomic-embed-text-v2-moe logo

ai/nomic-embed-text-v2-moe

Docker AI 官方镜像
多语言混合专家(MoE)文本嵌入模型,支持768维向量、约100种语言和512 token上下文,通过稀疏激活实现高效推理,适用于语义相似性任务、检索增强生成(RAG)和跨语言信息检索。
3.2千+ 次下载
2 个月前更新
ai/mxbai-embed-large logo

ai/mxbai-embed-large

Docker AI 官方镜像
mxbai-embed-large-v1是Mixedbread AI开发的顶级英文嵌入模型,能将文本转换为语义向量,适用于RAG、语义搜索、文本相似性分析及文本分类等NLP任务。
3 次收藏1万+ 次下载
1 年前更新
airbyte/source-e-conomic logo

airbyte/source-e-conomic

airbyte
暂无描述
8.3千+ 次下载
8 天前更新
airbyte/source-visma-economic logo

airbyte/source-visma-economic

airbyte
暂无描述
1万+ 次下载
8 天前更新
ai/qwen3-embedding logo

ai/qwen3-embedding

Docker AI 官方镜像
Qwen3 Embedding是Qwen系列最新专有模型,专为文本嵌入和排序任务设计,支持119种语言,提供0.6B、4B、8B等多种尺寸模型,适用于文本检索、代码检索、分类、聚类、平行文本挖掘等高级任务。
1万+ 次下载
7 个月前更新

查看更多 nomic-embed-v1.5 相关镜像