r/coolgithubprojects • • 10h ago

Claude Code reaches the same answers with 86% fewer tokens (free, open source)

Post image
22 Upvotes

10 comments sorted by

5

u/seiggy 9h ago

Fewer tokens doesn't mean anything without benchmarks to show it doesn't harm output, task completion, and intelligence.

I'd recommend using a benchmark like - https://www.scbench.ai/ that's difficult and shows real world problem sets with not just tokens burned, but turns, and task completion evaluation results.

4

u/Otherwise_Snow_5616 9h ago

fair point, and I agree: fewer tokens is worthless if the answers get worse. that's why the benchmark checks every answer, not just tokens: 9 tasks, run 12 times each with and without Fewer, on GitHub's clean machines. every answer was right both ways, and it records the steps too. it's all in the repo (bench/), so anyone can rerun it. didn't know about SlopCodeBench, thanks for the link. I'll try it and let you know.

2

u/JustSentYourMomHome 27m ago

Please update this post when you've run it through SCB. I'm very interested.

1

u/Otherwise_Snow_5616 22m ago

will do! plan is to run scb with claude code alone and with fewer on the same problems
• i'll post task completion, turns and tokens for both, even where fewer does worse
• i'll reply here when it's done so you get notified

2

u/JustSentYourMomHome 19m ago

Yes, absolutely share where Fewer does worse. This could be very beneficial for certain tasks, even if it fails at others. It doesn't have to work great at everything, but if it works great for some things, that could be very valuable. Keep us updated! Thanks.

3

u/Otherwise_Snow_5616 10h ago

My text didn't come through with the picture, so here it is:

Claude re-reads your whole chat before every reply. It's like re-reading the whole book to write the next sentence. Long chats and big test logs get paid for again and again.

I built Fewer to keep the book short:

- it makes long outputs short, and saves every page word for word, so Claude can still find any detail

- it reads ahead the files your message asks about

- after /clear, the new chat picks up where you left off

The picture is Fewer's map of where my own Claude Code tokens went in the last 30 days.

I tested it on 9 coding and web tasks, 12 runs each with and without Fewer, on GitHub's clean machines: 86% fewer tokens, and every answer right both ways. The benchmark is in the repo, so you can rerun it yourself.

Works on Mac, Linux and Windows. Free, Apache 2.0. If you use Claude Code a lot, try it and tell me what you see, especially if it doesn't help.

https://github.com/hazemdawahi/fewer

3

u/exclusivegreen 10h ago

Did you forget to post a link?

5

u/Otherwise_Snow_5616 10h ago

oops 😅 my text didn't come through. here it is: https://github.com/hazemdawahi/fewer

2

u/redneck-eyeball 5h ago

But you need Claude code for this. What about the free tier desktop app. Because that's all I have.
And yes, obviously I run out of tokens and need to wait for another 5 hours to continue what I'm working on.
No free version of Claude code as far as I'm aware.

2

u/Otherwise_Snow_5616 5h ago

ah yeah, Fewer only works with Claude Code for now, and Claude Code needs at least the $20 Pro plan, there's no free version. sorry!

but a few things from building it that I know work, even in the free app:

• new chat for every new task. claude rereads the whole chat before every reply, so one long chat gets expensive fast. this was the biggest saver in my tests

• when a chat does get long, ask claude for a short summary of where you are, then paste that into a fresh chat and keep going

• paste only the part you need. the one function, not the whole file. the error lines, not the whole log

• ask for short answers. everything claude writes gets reread on every later reply too

so doing those should make the 5 hours last longer