HackerTrans
TopNewTrendsCommentsPastAskShowJobs

mcyc

no profile record

Submissions

Rio 3.5 Open 397B – from Rio de Janeiro's city government

huggingface.co
17 points·by mcyc·28 दिन पहले·7 comments

Finding Optimal Tokenizers

blog.aqnichol.com
29 points·by mcyc·30 दिन पहले·2 comments

Show HN: blunder.clinic, realistic daily chess puzzles

blunder.clinic
4 points·by mcyc·4 माह पहले·0 comments

US science after a year of Trump

nature.com
18 points·by mcyc·6 माह पहले·0 comments

Bolmo: Byteifying the Next Generation of Language Models

arxiv.org
2 points·by mcyc·7 माह पहले·0 comments

Pebble Index

repebble.com
1 points·by mcyc·7 माह पहले·1 comments

Whisper Leak: A novel side-channel attack on remote language models

microsoft.com
3 points·by mcyc·8 माह पहले·1 comments

There is no such thing as a tokenizer-free lunch

huggingface.co
2 points·by mcyc·8 माह पहले·0 comments

The Chinese Computer: A Global History of the Information Age

foreignaffairs.com
2 points·by mcyc·8 माह पहले·0 comments

Masked Softmax Layers in PyTorch

mcognetta.github.io
4 points·by mcyc·8 माह पहले·0 comments

comments

mcyc
·26 दिन पहले·discuss
Lichess has a checkmate captcha that I think is cute.

It requires you to solve a mate-in-one puzzle to, e.g., post on the forums.

(Sorry, don't have a better link, there wasn't any non-technical I could find about it).

https://www.reddit.com/r/chess/comments/q19wgq/til_lichess_d...
mcyc
·28 दिन पहले·discuss
Yeah, it is interesting to me that it is coming from the _city_'s government. I've seen sovereign AI things at the country level, but this is the first municipal one I have seen.
mcyc
·2 माह पहले·discuss
You are right about most tokenizers being heavily biased towards English, but the situation is not so bad for Portuguese. Here are some results on the Goldfish corpus [1] with a few different tokenizers. This measures #characters in corpus / #subwords in tokenized corpus.

```

Llama3

english, 0.216

portuguese, 0.285

italian, 0.287

greek, 0.592

```

```

Gemma4

english, 0.219

portuguese, 0.246

italian, 0.249

greek, 0.537

```

```

Kimi2.6

english, 0.214

portuguese, 0.310

italian, 0.308

greek, 0.716

```

Portuguese is worse than English certainly, but it is on par with Italian (which I think has more overlap with English) and much better than Greek (since it doesn't use the Latin script and is definitely not prioritized in the tokenizer construction).

On your second point, tokenizer transfer allows for extending/modifying a tokenizer without retraining the model from scratch. The simplest version of this is tokenizer extension + continual pretraining, where you just add a bunch more tokens to the vocab for the language/domain that you want to improve and train a little more. It's been done for Japanese [2] and Indic languages, but afaik not Portuguese.

So I think that continual pretraining for a large base model would have probably been fine for this case with huge cost savings. But it is good to have the ability to train your own base models, so I don't think this is such a bad idea.

-----------------------

[1]: https://huggingface.co/datasets/goldfish-models/fish-food

[2]: https://arxiv.org/abs/2404.17790
mcyc
·6 माह पहले·discuss
This is a fantastic guide! I did a lot of work on structured generation for my PhD. Here are a few other pointers for people who might be interested:

Some libraries:

- Outlines, a nice library for structured generation

  - https://github.com/dottxt-ai/outlines
- Guidance (already covered by FlyingLawnmower in this thread), another nice library

  - https://github.com/guidance-ai/guidance
- XGrammar, a less-featureful but really well optimized constrained generation library

  - https://github.com/mlc-ai/xgrammar

  - This one has a lot of cool technical aspects that make it an interesting project
Some papers:

- Efficient Guided Generation for Large Language Models

  - By the outlines authors, probably the first real LLM constrained generation paper

  - https://arxiv.org/abs/2307.09702
- Automata-based constraints for language model decoding

  - A much more technical paper about constrained generation and implementation

  - https://arxiv.org/abs/2407.08103
- Pitfalls, Subtleties, and Techniques in Automata-Based Subword-Level Constrained Generation

  - A bit of self-promotion. We show where constrained generation can go wrong and discuss some techniques for the practitioner

  - https://openreview.net/pdf?id=DFybOGeGDS
Some blog posts:

- Fast, High-Fidelity LLM Decoding with Regex Constraints

  - Discusses adhering to the canonical tokenization (i.e., not just the constraint, but also what would be produced by the tokenizer)

  - https://vivien000.github.io/blog/journal/llm-decoding-with-regex-constraints.html
- Coalescence: making LLM inference 5x faster

  - Also from the outlines team

  - This is about skipping inference during constrained generation if you know there is only one valid token (common in the canonical tokenization setting)

  - https://blog.dottxt.ai/coalescence.html
mcyc
·10 माह पहले·discuss
This is a nice attitude. I think HN is overall pretty nice for geeking out and also hearing other people geek out, but there is still a strain of elitism (not like StackExchange thankfully) and so I'm happy to see comments like this.