What it is and how to install and run locally the LLM AI: nomic-embed-text

Nomic

Nomic-Embed-Text is an open-source text embedding model developed by Nomic AI, designed to handle extensive context lengths of up to 8192 tokens. This model surpasses existing benchmarks, including OpenAIs text-embedding-ada-002 and text-embedding-3-small, in both short and long-context tasks. Its development emphasizes transparency, reproducibility, and high performance in text embedding applications.

Key Features and Capabilities:

  • Extended Context Length: Supports sequences up to 8192 tokens, enabling the processing of longer documents without truncation.
  • Advanced Training Techniques: Utilizes a multi-stage contrastive learning pipeline, incorporating Rotary Position Embeddings and SwiGLU activations to enhance representation quality.
  • Open-Source Commitment: Released under the Apache-2.0 license, providing access to model weights, training code, and datasets for full reproducibility and auditability.
  • Efficient Inference: With 137 million parameters, it offers a balance between performance and computational efficiency, suitable for various deployment scenarios.
  • Dynamic Dimensionality Reduction: The v1.5 version introduces Matryoshka representation learning, allowing for dynamic adjustment of embedding dimensions to meet specific application needs.

Benchmark Performance:

Nomic-Embed-Text has demonstrated superior performance across multiple benchmarks:

  • Massive Text Embedding Benchmark (MTEB): Achieved an average score of 62.39, outperforming OpenAIs text-embedding-ada-002 (60.99) and text-embedding-3-small (62.26).
  • Jina Long Context Benchmark: Recorded an aggregate score of 85.53, surpassing other models in its parameter class.

Comparison with Similar Models:

The following table compares Nomic-Embed-Text with other prominent text embedding models:

Model Context Length Parameters MTEB Score Jina Long Context Score Open Weights Open Training Code Open Data
Nomic-Embed-Text 8192 137M 62.39 85.53 Yes Yes Yes
Jina-Embeddings-V2-Base-En 8192 137M 60.39 85.45 Yes No No
Text-Embedding-3-Small 8191 Not Disclosed 62.26 82.40 No No No
Text-Embedding-Ada-002 8191 Not Disclosed 60.99 52.70 No No No

In summary, Nomic-Embed-Text stands out for its extended context handling, advanced training methodologies, and commitment to open-source principles, making it a valuable asset for developers and researchers in the field of natural language processing.

Usage License

The nomic-embed-text model is released under the Apache License 2.0, a permissive open-source license that allows users to freely use, modify, and distribute the software, provided that proper attribution is given to the original authors. This license also permits commercial use, making it suitable for integration into proprietary applications. For more details, you can refer to the official license text at http://www.apache.org/licenses/LICENSE-2.0.

Advantages and Disadvantages of Running nomic-embed-text Locally

Advantages

  • Privacy: Running the model locally ensures that sensitive data remains within your own infrastructure, reducing the risk of data breaches or unauthorized access.
  • Offline Operation: Local deployment allows the model to function without an internet connection, ensuring uninterrupted service even in remote or network-restricted environments.
  • Portability: Deploying on a laptop enables the model to operate without external power sources, providing flexibility for mobile or field applications.
  • Reduced Latency: Local inference can offer faster response times compared to cloud-based solutions, as it eliminates the need for data transmission over the internet.
  • Cost Efficiency: Avoiding cloud service fees can lead to significant cost savings, especially for applications with high usage volumes.

Disadvantages

  • Resource Requirements: Running the model locally may require substantial computational resources, including CPU, memory, and storage, which could be a limitation for devices with constrained capabilities.
  • Maintenance Overhead: Managing and updating the model locally necessitates ongoing maintenance efforts, including software updates and hardware upkeep.
  • Scalability Limitations: Scaling the application to handle increased workloads may be more challenging with local deployments compared to cloud-based solutions that offer dynamic resource allocation.

OllamaRun nomic-embed-text with Ollama

Run the nomic-embed-text model locally with Ollama to work in private, offline and with low latency. Model page: nomic-embed-text on Ollama.

Windows Install Ollama on Windows and run nomic-embed-text

  1. Install Ollama with Winget:
winget install Ollama.Ollama
  1. Open PowerShell or Terminal and run the model:
ollama run nomic-embed-text

Compatible with Windows 10 and Windows 11. Ideal for professional desktops, content creation, and local workflows without internet.

macOSInstall Ollama on MacOS and run nomic-embed-text

  1. Install Ollama with Homebrew (Intel or Apple Silicon):
brew install ollama
  1. Run the model:
ollama run nomic-embed-text

On macOS Monterey, Ventura and Sonoma, nomic-embed-text performs very well on Apple Silicon (M1/M2/M3) for writing, development and study totally offline.

LinuxLinux: install Ollama and run nomic-embed-text

Install the LLM nomic-embed-text on Ubuntu, Debian, Fedora, Kali Linux, openSUSE, Linux Mint, Pop!_OS, Arch and Manjaro with a single command:

curl -fsSL [https://ollama.com/install.sh](https://ollama.com/install.sh)  sh
  1. Run the model on your distro (Ubuntu/Debian/Fedora/Kali/openSUSE/Mint/Pop!_OS/Arch/Manjaro):
ollama run nomic-embed-text

Perfect for Linux servers and laptops: automate workflows with scripts, draft content and test prompts without relying on the internet.

BSDBSD (FreeBSD, OpenBSD, NetBSD): run nomic-embed-text with Ollama in a container

The simplest way on BSD is to use a container (Docker/Podman) to isolate the environment:

docker run -d --name ollama -p 11434:11434 -v ollama:/root/.ollama ollama/ollama docker exec -it ollama ollama run nomic-embed-text

Valid for FreeBSD, OpenBSD and NetBSD in labs and security environments with local AI.

How to remove the model in Ollama

ollama rm nomic-embed-text

Delete the model files to free up disk space when you no longer need it.

Available models and tags

  • Model name: nomic-embed-text
  • Tags (Model): nomic-embed-text:latest

LM Run nomic-embed-text in LM Studio

LM Studio offers a graphical interface to download and run local models. Download the app according to your system from the official website: LM Studio (official download). Then search for nomic-embed-text, download and click Run.

WindowsInstall LM Studio on Windows and run nomic-embed-text

  1. Download LM Studio for Windows from lmstudio.ai and install it (compatible with Windows 10 and Windows 11).
  2. In Models, search for nomic-embed-text and click Download.
  3. Start the model with Run to chat locally without connection.

LM Studio on Windows simplifies model management and private sessions for productivity tasks, technical blogging, and prompt testing.

macOSInstall LM Studio on MacOS to run nomic-embed-text

  1. Download LM Studio for macOS from lmstudio.ai (Intel or Apple Silicon).
  2. Open the app, search for nomic-embed-text, download and click Run.

Smooth experience on Monterey, Ventura and Sonoma, with outstanding performance on Apple Silicon chips for creative and technical work without internet.

LinuxInstall LM Studio on Linux and run nomic-embed-text

  1. Download LM Studio (AppImage/package) from lmstudio.ai and follow the instructions for your distro.
  2. Open the app, search for nomic-embed-text, download and click Run.

Works on Ubuntu, Debian, Fedora, Kali Linux, openSUSE, Linux Mint, Pop!_OS, Arch and Manjaro, enabling local and private AI sessions for desktops and workstations.

Install LM Studio on BSD and its variants to run nomic-embed-text

Run LM Studio via compatibility or a container. Once inside the app, search for nomic-embed-text, download and click Run to start the local session.

In FreeBSD, OpenBSD and NetBSD, it is a practical approach for labs and audits where local AI is a requirement.

How to delete the model in LM Studio

  1. Go to Models > Installed.
  2. Find nomic-embed-text and click Delete to remove the downloaded files.

Hardware Required to Run the LLM nomic-embed-text:latest

Model Version Required Memory Optimal Memory Compatible GPUs Alternative CPU RAM Setup
nomic-embed-text:latest 16 GB 32 GB NVIDIA RTX 3090, NVIDIA A100 16-core CPU with 64 GB RAM

What is Quantization in LLMs?

Quantization is a technique used to reduce the memory and computational requirements of large language models (LLMs) by converting their weights and activations from high-precision formats, such as 32-bit floating-point (FP32), to lower-precision formats like 8-bit integers (INT8) or even 4-bit integers (INT4). This process decreases the models size and speeds up inference, making it more efficient for deployment on resource-constrained devices.

How Does Quantization Work?

Quantization works by mapping the continuous range of values in the models parameters to a finite set of discrete values. This involves:

  • Weight Quantization: Reducing the precision of the models weights. For example, converting FP32 weights to INT8 reduces memory usage by 75%.
  • Activation Quantization: Lowering the precision of activations, which are the outputs of neurons during inference. This further reduces memory and computational demands.

Various quantization methods exist, such as post-training quantization (PTQ) and quantization-aware training (QAT). PTQ applies quantization after the model has been trained, while QAT incorporates quantization into the training process to maintain accuracy.

Quantization in nomic-embed-text:latest

For the nomic-embed-text:latest model, quantization can be particularly beneficial. By applying INT8 quantization, the models memory footprint can be significantly reduced, allowing it to run efficiently on hardware with limited resources without substantial loss in performance. This makes it feasible to deploy the model on consumer-grade GPUs or even high-end CPUs with sufficient RAM.

Optimal Setup to Run nomic-embed-text:latest Locally

To achieve optimal performance when running nomic-embed-text:latest locally, the following hardware setup is recommended:

  • GPU: NVIDIA RTX 3090 or NVIDIA A100
  • VRAM: 32 GB
  • CPU: 8-core processor
  • RAM: 64 GB
  • Storage: SSD with at least 1 TB of space

This configuration ensures that the model runs smoothly with minimal latency, providing efficient inference capabilities.

Minimum Affordable Setup

For a more budget-friendly setup that can still run nomic-embed-text:latest effectively, consider the following:

  • GPU: NVIDIA RTX 3060
  • VRAM: 12 GB
  • CPU: 6-core processor
  • RAM: 32 GB
  • Storage: SSD with at least 512 GB of space

While this setup may result in slightly longer inference times compared to the optimal configuration, it remains a viable option for running the model locally without significant performance degradation.

Applications of nomic-embed-text:latest

The nomic-embed-text:latest model can be utilized in various applications, including:

  • Text Embedding: Generating vector representations of text for tasks like semantic search and clustering.
  • Natural Language Processing (NLP): Enhancing applications such as sentiment analysis, topic modeling, and language translation.
  • Information Retrieval: Improving search engine results by understanding the context and semantics of queries.
  • Recommendation Systems: Providing personalized content suggestions based on textual data analysis.

By leveraging the capabilities of nomic-embed-text:latest, developers can enhance the performance and accuracy of various NLP applications, leading to more effective and user-friendly solutions.

Like

Be the first to leave a comment

Leave a Reply

Your email address will not be published. Required fields are marked *