nowfound

AI · September 15, 2024

WT

Wordllama – Things you can do with the token embeddings of an LLM

After working with LLMs for long enough, I found myself wanting a lightweight utility for doing various small tasks to prepare inputs, locate information and create evaluators. This library is two things: a very simple model and utilities that inference it (eg. fuzzy deduplication). The target platform is CPU, and it’s intended to be light, fast and pip installable — a library that lowers the barrier to working with strings semantically. You don’t need to install pytorch to use it, or any deep learning runtimes. How can this be accomplished? The model is simply token embeddings that are…

Visit github.comAlternativestop 6% of September 2024

In plain words

Wordllama is a lightweight Python library for working with text embeddings and semantic string operations. It provides utilities for tasks like fuzzy deduplication, input preparation, and information retrieval without requiring PyTorch or deep learning frameworks. The library uses a simple model based on averaged token embeddings from LLMs, designed to run efficiently on CPU hardware. It's intended for developers who want semantic text processing capabilities with minimal dependencies and installation overhead.

written from the facts on this page · September 2026

From the sources

In the maker’s words, at launch

After working with LLMs for long enough, I found myself wanting a lightweight utility for doing various small tasks to prepare inputs, locate information and create evaluators. This library is two things: a very simple model and utilities that inference it (eg. fuzzy deduplication). The target platform is CPU, and it’s intended to be light, fast and pip installable — a library that lowers the barrier to working with strings semantically. You don’t need to install pytorch to use it, or any deep learning runtimes. How can this be accomplished? The model is simply token embeddings that are average pooled. To create this model, I extracted token embedding (nn.Embedding) vectors from LLMs, concatenated them along the embedding dimension, added a learnable weight parameter, and projected them to a smaller dimension. Using the sentence transformers framework and datasets, I trained the pooled embedding with multiple negatives ranking loss and matryoshka representation learning so they can be truncated. After training, the weights and projections are no longer needed, because there is no contextual calculations. I inference the entire token vocabulary and save the new token embeddings to be loaded to numpy. While the results are not impressive compared to transformer models, they perform well on MTEB benchmarks compared to word embedding models (which they are most similar to), while being much smaller in size (smallest model, 32k vocab, 64-dim is only 4MB). On the utility side, I’ve been adding some tools that I think it’ll be useful for. In addition to general embedding, there’s algorithms for ranking, filtering, clustering, deduplicating and similarity. Some of them have a cython implementation, and I’m continuing to work on benchmarking them and improving them as I have time. In addition to “standard” models that use cosine similarity for some algorithms, there are binarized models that use hamming distance. This is a slightly faster, similarity algorithm, with significantly less memory per embedding (float32 -> 1 bit). Hope you enjoy it, and find it useful. PS I haven’t figured out Windows builds yet, but Linux and Mac are supported.

Does the same job

all alternatives →
  • IB
    I built a tiny LLM to demystify how language models workApr 2026 · github.com · ▲915

    Built a ~9M param LLM from scratch to understand how they actually work. Vanilla transformer, 60K synthetic conversations, ~130 lines of PyTorch. Trains in 5 min on a free Colab T4. The fish thinks the meaning of life is food. Fork it and swap the personality for your own character.

  • TensorZero2025 · ▲316

    Open-source stack for industrial-grade LLM applications

  • Local LLMs by Sttabot AI2023 · ▲112

    Build local LLMs using top data science libraries

  • Geekflare Scraping API v2Apr 2026 · ▲84

    RAG-ready web scraping that cuts your LLM token costs

  • AA
    An all-in-one blog for learning Large Language Models (LLMs)2025 · comfyai.app · ▲5

    An all-in-one blog for learning LLM ins and outs: tokenize, attention, PE, and more Project I've been diving deep into the internals of Large Language Models (LLMs) and started documenting my findings. My blog covers topics like: Tokenization techniques (e.g., BBPE) Attention mechanism (e.g. MHA, MQA, MLA) Positional encoding and extrapolation (e.g. RoPE, NTK-aware interpolation, YaRN) Architecture details of models like QWen, LLaMA Training methods including SFT and Reinforcement Learning If you're interested in the nuts and bolts of LLMs, feel free to check it out:…

  • 1B

More ai this month

the category →
  • I trained a 125M-parameter transformer to autocomplete piano performances in real time (~108 notes/sec on an iPhone 15). The idea is basically GitHub Copilot or Tabnine, except instead of prompting it with code, you prompt it by playing a few notes on a MIDI piano. The model then continues what you played, entirely on-device. The app is free if anyone wants to try it. Happy to answer questions about the model, training, Core ML, or the many things that didn't work.

    AI · 17d ago · simedw.com

  • Astute585

    Automate your B2B brand going viral, with new media creators

    AI · 18d ago · company-app.joinastute.com

  • Grok Bot547

    AI teammates that you can give real work to

    AI · 25d ago · x.ai

  • Hey HN, Henry from Cactus here! We previously released Cactus Needle, a 14MB agentic LLM for tool call, device use, and structured extraction for phones, wearables, smart homes, small robots and microcontrollers. We got really great feedback here, and have now incorporated the suggestions to release Needle 2. The whole model is a single 14MB binary that runs a full session in 28MB of RAM; 45m parameters at 2bit compression. Needle hits 500 tokens/sec decode speed on a Raspberry Pi 5, sits between 400-1,500 tokens/sec on VR devices like Meta Quest 3S and Apple Vision Pro, and ranges…

    AI · 27d ago · cactuscompute.com

  • Turn website visitors into qualified pipeline

    AI · 19d ago · clarasdr.ai

  • Kane CLI446

    Natural language browser & mobile app tests from terminal

    AI · 24d ago · testmuai.com

Launched alongside, September 2024

the whole month →
  • Wispr Flow2,737

    Speak naturally, write perfectly & 3x faster in every app

    AI · 2024 · wisprflow.ai

  • Pathway1,335

    Get user insights 10x faster

    Work · 2024 · wynde.io

  • Personalized AI daily planning that suits your life

    AI · 2024 · beforesunset.ai

  • Osmos1,194

    Match with like-minded professionals for 1:1 conversations

    Growth · 2024

  • Polar1,169

    An open source monetization platform for developers

    Dev tools · 2024 · polar.sh

  • Carrot Care1,167

    Understand & optimise your bloodwork

    Life & fun · 2024 · carrotcare.health