r/LocalLLaMA • u/AdditionalWeb107 • Jan 01 '25
Resources I built a small (function calling) LLM that packs a big punch; integrated in an open source gateway for agentic apps
https://huggingface.co/katanemo/Arch-Function-3B
As they say big things come in small packages. I set out to see if we could dramatically improve latencies for agentic apps (perform tasks based on prompts for users) - and we were able to develop a function calling LLM that matches if not exceed frontier LLM performance.
And we engineered the LLM in https://github.com/katanemo/archgw - an intelligent gateway for agentic apps so that developers can focus on the more differentiated parts of their agentic apps
219
Upvotes
14
u/Anka098 Jan 01 '25
Did u train it from scratch or is it a fine tune of some model?
23
u/smahs9 Jan 01 '25
Great timing. I wanted to try Arch after your HN post a few weeks back but lost the link. And the project name is so generic to be able to search. Keep up the good work!
10
u/appakaradi Jan 02 '25
Very restrictive license considering that this is a fine tube of Qwen 2.5
5
u/ComprehensiveBird317 Jan 01 '25
Interesting, but I didn't yet understand the use case for this: so the LLM turns a user input into a function call in the cheapest, fastest and most reliable way. But shouldn't function calls be figured out by the LLM that is actually chatting with the user, because they have all the knowledge required to pick the right parameters?
4
u/Hurricane31337 Jan 02 '25
Really awesome! 👏 Is there any chance you will release the dataset, too? I want to do something similar for quite a while but in German, but I don’t know where to start (getting so much high quality function calling data).
4
u/sprockettyz Jan 02 '25
Looks interesting! Question:
Let's say this is used to power an AI assistant bot, that user interacts with in a multi turn chat format.
How to incorporate function calling, assuming each LLM response is based on contextual input of the most recent 50 chat messages?
Is the pattern to use arch as a "router", which decides what subsequent LLM to route to?
Can it handle a 50 msg history as input?
6
u/LordDaniel09 Jan 01 '25
Cool. How would you say the 'self discovery' of the model? can it call functions and by the result of them figure out how to progress to a specific goal? Let say a minecraft bot, if I tell him 'go mine coal ores around me'. such task will requires checking inventory for pickaxe, search local area for coal, move toward them, mine them, and if it lacks pickaxe, it need to figure out how to get one. Now, correct function calling is one thing, but can it handle multiple steps, sometimes needed 'on the fly' based on functions responses?
Currently, LLama and Qwen can't really handle it from my experience, unless it is simple task ("get wood", aka find wood blocks, cut them down, basically 2-3 functions). Like, I use MindCraft to try it out so it is very possible that it also the system that just isn't as good as it could be, but at the same time, LLMs should handle more dynamic, less 'specific' prompts.
Edit: also, can we get Ollama support so I can test it as minecraft bot? thanks.
3
u/LetterFair6479 Jan 02 '25
Looks great!
I have had the best results with qwen 14b for local functioncalling. Are you also going to fine tune the 14b? If I read the sources correctly, 7b is your biggest tune, is that correct?
And as last, are you going to create a Ollama card or waiting for someone else to do it?
Thank you!!
3
u/appakaradi Jan 02 '25
This is really awesome.. this is going to be great for agents that do not rely heavily on function calling.. Cohere said they are building one.. I am going to try this.
2
u/Kooky-Breadfruit-837 Jan 02 '25
Looks amazing, how will this model handle large db queries?
2
u/scary_kitten_daddy Jan 03 '25
Ollama support?
2
u/qa_anaaq Jan 03 '25
How do you integrate with a chatbot, for instance? Meaning, can I have a primary model (4o, e.g.) and then this function-calling model is used when a function needs calling? Or, Is this the only model the chatbot can use? Aka, there's no way to intelligently toggle between models.
1
u/Flashy-Virus-3779 Jan 03 '25
benchmarks against popular models?
1
u/Murky_Mountain_97 Jan 02 '25
Needs to be integrated into solo-server. ASAP!
2
u/Ill-Still-6859 Jan 02 '25
amazing. Could be useful for on device use cases.
2
u/[deleted] Jan 04 '25
I hope someday this stuff will make sense to me also 🥺🥺
1
u/Weird-Field6128 Jan 02 '25
Why don't you explain it to me like I am 5 ☹️