Hacker News

Kalash People

Hacker News - Sat, 09/14/2024 - 11:29pm
Categories: Hacker News

One in Ten

Hacker News - Sat, 09/14/2024 - 11:27pm

Article URL: https://eftegarie.com/one-in-ten/

Comments URL: https://news.ycombinator.com/item?id=41544976

Points: 1

# Comments: 0

Categories: Hacker News

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

Hacker News - Sat, 09/14/2024 - 11:25pm

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.

Comments URL: https://news.ycombinator.com/item?id=41544969

Points: 1

# Comments: 0

Categories: Hacker News

Ask HN: Recommendation for a tool for history research (gathering)?

Hacker News - Sat, 09/14/2024 - 11:11pm

Hello,

I've been trying to find a tool to help me gathering and organizing historical and biographical data.

I like doing some research on specific interests, but as an amateur I do most of it on text files, sheets and mind maps in a chronological directory structure with images and documents, etc. it is horrendous, but I did not find a tool to help me managing this. Is there something for this use case out there?

I believe something like a mind map with chronological information/visualisation, cross-linking, attachments and references would work, but I'm kinda struggling to find the right tool (looking at TreeSheet and another mind-map tool right now, but it is not feeling right yet).

Thanks

Comments URL: https://news.ycombinator.com/item?id=41544909

Points: 1

# Comments: 1

Categories: Hacker News

Spots Around Hyrule (TotK)

Hacker News - Sat, 09/14/2024 - 10:58pm

Article URL: https://totk-loci.mataroa.blog

Comments URL: https://news.ycombinator.com/item?id=41544851

Points: 1

# Comments: 0

Categories: Hacker News

Monk Mode

Hacker News - Sat, 09/14/2024 - 10:47pm
Categories: Hacker News

OpenAI Discriminates According to ChatGPT

Hacker News - Sat, 09/14/2024 - 10:41pm

OpenAI has made the unfortunate choice to not allow pre-paid cards for pre-paid credits, despite numerous other online providers happily allowing such cards. Even for post payment on cloud services. I'll let ChatGPT explain why that's discriminatory -- and a breach of OpenAI's ideals.

I think that it's important for organizations like OpenAI not just to talk about ideals, but to practice them.

https://chatgpt.com/share/66e64823-3eb0-8000-ad2e-92a2c33bf5d1

Comments URL: https://news.ycombinator.com/item?id=41544795

Points: 1

# Comments: 1

Categories: Hacker News

Pages