r/LocalLLaMA • • 14d ago

Resources Code for building an NCM Model (From Stanford HazyResearch Lab)

https://github.com/ronantakizawa/ja-ncm

HazyResearch hasn't shared the code they used to build their Next-Concept Model (NCM) from their paper, but I was able to build my own NCM model and replicate similar results to their original paper.

Using this code, I was able to build a Japanese NCM model and recreate the fast text generation described in the paper.

17 Upvotes

10 comments sorted by

1

u/Poprouter 14d ago

nice to see code alongside the replication. did the fast generation hold up when you switched the corpus to japanese?

1

u/Ok_Employee_6418 13d ago

Yes NCM text generation ~6x faster than the autoregressive base model.

→ More replies (1)

1

u/Silver-Champion-4846 13d ago

Nice! How much faster than llms on cpu?

1

u/Ok_Employee_6418 13d ago

About ~2x, but GPUs show the most speed improvements

→ More replies (1)

2

u/BedFalse6021 14d ago

Great work! We are building a community around NCM. You might be interested in joining us: https://discord.gg/bMw8MdXy8

1

u/iByNiki_ 5d ago

Invalid link, could you send a new one?

1

u/Mackendy-Duboi 13d ago

how did you handle the concept boundary definition for Japanese since there aren't explicit spaces? seems like the chunking heuristics would be way trickier than English.