Shrinking a language detection model to under 10 KB
david-gilbertson.medium.com
·10h·
Discuss: Hacker News
🤖AI models
Preview
Report Post

9 min read12 hours ago

TL;DR: AI models are usually too large to be sent to a user’s device, but for some tasks they can be made surprisingly small.

On the platform where I write this (medium.com) I’m forever typing snippets of code only to have the system guess the wrong language (and use the wrong syntax highlighting). The same is true on other platforms, and I’ve always been puzzled by this, I mean, how hard can it be?

A frontier LLM can detect the language easily, but what about smaller models? CodeBERTa-language-id is built for this exact task, and is 99.9% accurate, but it’s also 330 MB. So from the application-developer’s perspective it’s destined to live forever on a server.

At the other end of the scale,…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help