Live data from Hacker News

Ask HN: Is anyone doing anything cool with tiny language models?

news.ycombinator.com

221–230 of 356 posts

Re: Ask HN: Is anyone doing anything cool with tiny language models?

#221
post #178

Earlier quoted context omitted.

How accurate are the classifications?

I don't know. This paper [1] reports accuracies in the 97-98% range on a similar task with more powerful models. With Gemma 2 2b the accuracy will certainly be lower. [1] https://www.medrxiv.org/content/10.1101/2024.10.01.24314702v...

> I don't know.

HN in a nutshell: I've built some cool tech but have no idea if it is helpful or even counter productive...

Re: Ask HN: Is anyone doing anything cool with tiny language models?

#222
post #24

No, but I use llama 3.2 1b and qwen2.5 1.5 as bash oneliner generator, always runnimg in console.

Could you elaborate?

I just run llama-cli with the model. Every time I want some "awk" or "find" trickery, I just ask model. Good for throwaway python scripts too.

Re: Ask HN: Is anyone doing anything cool with tiny language models?

#223
post #20

I have a mini PC with an n100 CPU connected to a small 7" monitor sitting on my desk, under the regular PC. I have llama 3b (q4) generating endless stories in different genres and styles. It's fun to glance over at it and read whatever it's in the middle of making. I gave llama.cpp one CPU core and it generates slow enough to just read at a normal pace, and the CPU fans don't go nuts. Totally not productive or really…

Do you find that it actually generates varied and diverse stories? Or does it just fall into the same 3 grooves? Last week I tried to get an LLM (one of the recent Llama models running through Groq, it was 70B I believe) to produce randomly generated prompts in a variety of styles and it kept producing cyberpunk scifi stuff. When I told it to stop doing cyberpunk scifi stuff it went completely to wild west.

It's a 3b model so the creativity is pretty limited. What helped for me was prompting for specific stories in specific styles. I have a python script that randomizes the prompt and the writing style, including asking for specific author styles.

Re: Ask HN: Is anyone doing anything cool with tiny language models?

#224

I have a mini PC with an n100 CPU connected to a small 7" monitor sitting on my desk, under the regular PC. I have llama 3b (q4) generating endless stories in different genres and styles. It's fun to glance over at it and read whatever it's in the middle of making. I gave llama.cpp one CPU core and it generates slow enough to just read at a normal pace, and the CPU fans don't go nuts. Totally not productive or really…

this sounds pretty cool, do you have any video/media of it?

I don't have a video but here's a pic of the output: https://imgur.com/ip8GWIh

Re: Ask HN: Is anyone doing anything cool with tiny language models?

#225

I have a mini PC with an n100 CPU connected to a small 7" monitor sitting on my desk, under the regular PC. I have llama 3b (q4) generating endless stories in different genres and styles. It's fun to glance over at it and read whatever it's in the middle of making. I gave llama.cpp one CPU core and it generates slow enough to just read at a normal pace, and the CPU fans don't go nuts. Totally not productive or really…

this is so cool, any chance you post a video?

Just this pic: https://imgur.com/ip8GWIh

Re: Ask HN: Is anyone doing anything cool with tiny language models?

#226

Earlier quoted context omitted.

To me this take is like smokers complaining that the evil government is forcing the good tobacco companies to degrade the experience by adding pictures of cancer patients on cigarette packs.

Those don’t really work: https://jamanetwork.com/journals/jamanetworkopen/fullarticle...

Do they help deter people from becoming smokers in the first place?

Re: Ask HN: Is anyone doing anything cool with tiny language models?

#227

I had an LLM create a playlist for me. I’m tired of the bad playlists I get from algorithms, so I made a specific playlist with an Llama2 based on several songs I like. I started with 50, removed any I didn’t like, and added more to fill in the spaces. The small models were pretty good at this. Now I have a decent fixed playlist. It does get “tired” after a few weeks and I need to add more to it. I’ve never been able…

Interesting! I wrote a prompt for something similar[1], but I use Claude Sonnet for it. I wonder how a small model would handle it. Time to test, I guess.

[1]: https://git.sr.ht/~jamesponddotco/llm-prompts/tree/trunk/dat...

Re: Ask HN: Is anyone doing anything cool with tiny language models?

#228
post #146

I used a small (3b, I think) model plus tesseract.js to perform OCR on an image of a nutritional facts table and output structured JSON.

What was the model? What kind of performance did you get out of it? Could you share a link to your project, if it is public?

https://github.com/JLCarveth/nutrition-llama

I've had good speed / reliability with TheBloke/rocket-3B-GGUF on Huggingface, the Q2_K model. I'm sure there are better models out there now, though.

It takes ~8-10 seconds to process an image on my M2 Macbook, so not quite quick enough to run on phones yet, but the accuracy of the output has been quite good.

Re: Ask HN: Is anyone doing anything cool with tiny language models?

#229

Earlier quoted context omitted.

Llama 3.2 punches way above its weight. For general "language manipulation" tasks it's good enough - and it can be used on a CPU with acceptable speed.

How many tokens/s?

10-15t/s on 12400 with ddr5

Re: Ask HN: Is anyone doing anything cool with tiny language models?

#230

Earlier quoted context omitted.

You're using it to anonymize your code, not de-anonymize someone's code. I was confused by your comment until I read the replies and realized that's what you meant to say.

I read it the other way, their code contains eg fetch(url, pw:hunter123), and they're asking Claude anonymized questions like "implement handler for fetch(url, {pw:mycleartrxtpw})" And then claude replies fetch(url, {pw:mycleartrxtpw}).then(writething) And then the local llm converts the placeholder mycleartrxtpw into hunter123 using its access to the real code

> Put in all your work related questions in the plugin, an LLM will make it as an abstract question for you to preview and send it

So the LLM does both the anonymization into placeholders and then later the replacing of the placeholders too. Calling the latter step de-anonymization is confusing though, it's "de-anonymizing" yourself to yourself. And the overall purpose of the plugin is to anonymize OP to Claude, so to me at least that makes the whole thing clearer.

Post reply on HN