r/javascript • u/lordhiggsboson • May 16 '26
cogentlm - Run AI models locally with high-performance directly in-browser
https://www.npmjs.com/package/cogentlm
0
Upvotes
r/javascript • u/lordhiggsboson • May 16 '26
4
u/lordhiggsboson May 16 '26 edited May 17 '26
metrics comparing congentlm vs transfomers.js vs webllm, over 9 runs with 1 warmup
(windows desktop, nvidia 3080)
1
u/cujjjjo May 18 '26
I've tried it and am quite impressed! I'd like to add encoder support, let me know if I can help. Thx for the great work!
1
u/lordhiggsboson May 16 '26 edited May 16 '26
I built cogentlm because I wanted an easy way to integrate LLMs into my projects that went beyond mere chatbot interfaces to allow for richer, interactive UX/UI use cases.
cogentlm allows you to embed a small LLM into your web app, running at the highest performance available. We benchmarked against both Transformers.js and WebLLM, and outperformed them both on TTFT and tokens/s by a factor of >2x (depending on model).
npm:
npm i cogentlmI would love feedback on the API design or what features you'd like to see supported!
0
u/[deleted] May 17 '26
[deleted] — view deleted comment
0
u/[deleted] May 17 '26
[deleted] — view deleted comment