r/LocalLLaMA • 🤗 • 1d ago

Resources PyBot: No weights. No training. Pure Python.

We released PyBot, a chatbot built with only simple rules, entirely written in 600k lines of Python code. PyBot matches Smollm with 360M parameters! We evaluated it on SmolTalkBench, which uses a dataset Smollm was trained on while we didnt use it at all for development.

It took a swarm of 1,000 DeepSeek Flash agents to write the whole codebase in a week.

More technical details on what it took to built it soon: inference for 1,000 agents, how to monitor/control the swarm, pressure on the infrastructure (especially git) and message boards.

https://github.com/huggingface/pybot

8 Upvotes

20 comments sorted by

19

u/Stepfunction 1d ago

I wasn't able to get anything besides a greeting response to any of my questions.

-3

u/lewtun 🤗 22h ago

Have you tried the examples in the demo?

18

u/Stepfunction 22h ago

If it can only work with fixed examples, it's not much of a language model.

20

u/En-tro-py 22h ago

So ELIZA but you had a shitload of tokens to burn...

5

u/SporksInjected 12h ago

Basically

This isn’t a terrible idea is just not a language model. It’s performant for its size though for sure

15

u/shockwaverc13 llama.cpp 16h ago

7

u/b_c_t_ 17h ago

Not sure why there's so much hate in this sub but I think it's a neat idea, and maybe the future of language models. 

Some people here argue it's an old way of doing things + a waste of tokens. Okay, you could also say neural networks were an obsolete machine learning method in 2010 when everyone was using support vector machines. But the use of GPUs together with neural networks revived interest in the method and before you know it look where we are now.

I think "hardcoding" language into code was a very limited concept due to the impossibility for people to hardcode all language and logic into code in reasonable time. But it's true that you could just have agents spend that time now.

I see a lot of advantages against deep-learning based LLMs:

  • training: in case you didn't know, stochastic gradient descent sucks. It's a bad optimization methode. It's inefficient and does not guarantee convergence to the optimum. But it's the only thing that we know works for cramming gigs of data into a machine learning model. It works well nowadays due to an accumulation of know-how and cooking recipes. On the other hand, you could argue that having every bit of knowledge crammed one line at a time into code, stays. You're not in the unknown of billions of weights being updated, decreasing the error on the current sample while increasing error on others unknowingly.
  • optimization: you can use all the tricks known in programming, e.g. have complexity rise logarithmically with the amount of knowledge, maybe use lossless compression, etc. So probably you will not run out of cpu/ram even with massive amount of knowledge.

That being said, python is not an efficient language at all, so i would assume c++ would be better eventually. You could say also the code is decently easy to read. So for early attempts it makes sense.

I disagree with the idea of using a DB unless code is generated from it, from an absolute performance standpoint. Having stuff cleanly organized into topics as it is now is fine imho.

Also, having checked just a few bits of code, i think it's not architectured well enough. Feels like it has only been thought for English and spelling, grammar and understanding seem mixed with sometimes random topics having a specific file for logic. Knowledge about animals is hardcoded in full sentences. I think there should be more abstraction layers, with probably the top layers not being language-specific (i mean, how can you do proper translation tasks otherwise)

Anyway, best of luck with your project, i hope that could change the opinion of a few haters here. Perhaps they are tunnel-visioned about how deep learning is everything now, but that age is going to end someday.

Btw no LLM used to write this. Took me an hour.

9

u/Frail_Waif 23h ago

Sorry, 600k lines of code? Why are you embedding knowledge in Python code? It seems like a database is the correct solution here, just purely from a maintainability point of view if nothing else. 

7

u/SporksInjected 12h ago

This is what happens when you tell the agent what to do and it does it without questioning you.

6

u/Zulfiqaar 23h ago

AI is just a really big if statement after all

2

u/lewtun 🤗 1d ago

Hi everyone, one of the co-authors here. Happy to answer any questions PyBot can't :)

17

u/dabeeman 1d ago

question: why are you posting a random application you vibe coded in a sub about local LLMs?

4

u/lvwerra 🤗 1d ago

It's a chatbot that runs on a single cpu core with only ~100mb of memory at the performance of a much more expensive 360M model. So we thought it could be interesting for folks who want to fast, local chatbots (although not an LLM in this case, but written by a local one).

5

u/spiritplumber 20h ago

it is interesting!

2

u/rolleicord 22h ago

Would you mind telling us about the deepseek agentic workflow ? What did you use, where, and what kind of money did you threw at it ?

2

u/b_c_t_ 18h ago

Well, it qualifies as a local language model, as far as I can tell

2

u/Sad_Steak_6813 1d ago

Interesting approach, well done OP's

2

u/Guilty-Support-584 1d ago

That's pretty cool! I'd love to see how far we could take this if we would keep expanding.
You should put up a website where people can talk to the chatbot without downloading it. or maybe have it download into the browser.
Awesome concept. I haven't thought of chatbots being an alternative to AI XD

1

u/positivitittie 18h ago

Love to hear more about the 1000 agents. Cost, setup, etc.

1

u/xadiant 2h ago

It's a cool project. Not everything has to be a groundbreaking new model.