Show HN: Tabby – A self-hosted GitHub Copilot (github.com)
I would like to introduce Tabby, which is a self-hosted alternative to GitHub Copilot that you can integrate into your hardware. While GitHub Copilot has made coding more efficient and less time-consuming by assisting developers with suggestions and completing code, it raises concerns around privacy and security.
Tabby is in its early stages, and we are excited to receive feedback from the community.
Its Github repository is located here: https://github.com/TabbyML/tabby.
We have also deployed the latest docker image to Huggingface for a live demo: https://huggingface.co/spaces/TabbyML/tabby.
Tabby is built on top of the popular Hugging Face Transformers / Triton FasterTransformer backend and is designed to be self-hosted, providing you with complete control over your data and privacy. In Tabby's next feature iteration, you can fine-tune the model to meet your project requirements.
130 comments
[ 3.2 ms ] story [ 197 ms ] thread[1]: https://github.com/TabbyML/tabby/blob/main/tabby/tools/repos...
[2]: https://github.com/TabbyML/tabby/blob/main/tabby/tools/train...
Not necessarily better than SO but I find it nice to see options.
[0] https://codeium.com/
Is it writing meaningful code for me? Nah. Is it helpful? Certainly.
Not that I find it as useful as most people do, but there is a difference...
It's also not that great with go, but surprisingly (to me) still better than C#.
It costs 10$/month and probably saves me hours in stupid boilerplate, not just because it reduces typing but because the kind of typing it fixes is the boring stuff that gets me out of flow.
And boilerplate is a vague term, good example of copilot "AI" features :
and we can be talking about very non-trivial permutations here where it's obvious from context what you want to do but generalizing to cover all cases would be more work than just writing it.And tests - sometimes it can generate a correct test with mocks just from function name, sometimes it's garbage - but it's really easy to glance at which it is.
My current experience with copilot for ~2 months is that it's really good at such boilerplate, it's annoying when it's late or fails at what I expect it but, and it makes generating boilerplate code very cheap so it can lead to a lot of duplication.
If you're good enough you know to pick up when you should apply DRY and when not, you'll get a feel when copilot is useful and it will be a decent productivity boost IMO. If they made it faster and more reliable (just for the cases I already use it for) I would pay >100$ month out of pocket for sure.
I've found it amazing when working in semi-familiar programming languages. I'm primarily a Ruby dev, but currently working in Python. The languages are close enough that it's an easy transition, but they do a lot of fundamentals differently.
Previously, it'd be extremely disruptive to my thought-process to have to go lookup basic functions, like checking array lengths or running a regex on a string.
Now, I just write a comment like `# check array length` or `# on x_var, run this regex "\s+"`. Copilot spits back what I need (or at least close enough to avoid having to break context).
Even in core languages, I'm finding it very useful for writing system calls or niche functionality that I don't use frequently. My mental model knows what needs to be done, but I don't remember the exact calls off the top of my head.
Copilot is fantastic at predicting where I'm heading next once I give it a little bit of a start. It helps me work out unfamiliar functions that I might need to chain, or syntax I'm not entirely familiar with.
I'd say it's a big winner for me.
In the meantime, I'm training language-specific base models using NeoX blocks. I hope to release them soon.
The Huggingface Space demo is running on a derived model of Salesforce/codegen-350M-multi
Do they rely on legal contracts to prevent customers from using the software for free or modifying it for their own purposes?
If we are talking about open source self-hosted specifically, it's mostly consulting, paid support, and offering managed hosting.
Related research works include [1]. (Hints: combine code search and LLM).
[1]: RepoCoder: Repository-Level Code Completion Through Iterative Retrieval and Generation https://arxiv.org/abs/2303.12570
This also reveals Tabby's roadmap beyond other OSS work like Fauxipilot :)
That doesn't answer the question, can anyone without more VRAM than sense actually run it as-is or should we wait until they reach their allegedly impossible aspirational goal?
The very first line of this sort of post should be the specs required and if the trained model weights are actually available, otherwise it's just straight up clickbait.
A 1B parameter transformer model is on the low/tiny-end of model size these days.
The simpler the task I'm trying to do, the better chance it has of being correct, but that's also the part where I feel I get the most benefit from it, because I already thoroughly understand exactly what I'm writing, why I'm writing it, and what it needs to look like, and Copilot sometimes saves me the 5-30s it takes to write it. Over a day, that adds up and I can move marginally faster.
It's definitely not a 100x improvement (or even a 10x improvement), but I'm glad to have it.
If this works as well, locally, to escape the privacy issue, I'll be thrilled. Checking it out.
Making the simpler code much faster to develop leaves me a lot more time and focus for the complex work.
These tools really are amazing, even with their limitations.
I recently needed a script to grab all my github repos from the github api and produce a CSV with the columns URL, name, description, and it could not do that at all. Just hallucinated libraries and APIs that did not exist.
Genuine question, do you not use GitHub for things other than copilot? It seems to me either the privacy issues of copilot are overblown or the privacy issues of GitHub itself are underblown, because they both end up with basically the same data.
I certainly not use Github for everything.
That being said, I've way too often encountered people for whom git oddly only exists in the form of Github, to the point of those being synonymous to them. The concept of a self-hosted repo seems totally foreign to them, and the only local git trees they have is what their IDE created for them in the directory of their checked out or created source project. It's weird, but such people exist… and lots of them.
It's like learning react first ,and html+css later, it's doable but a bit convoluted
In this context I think it's important to note the distinction between "Copilot for Individuals" and "Copilot for Business", because for twice the money you potentially get a lot more privacy:
> What data does Copilot for Individuals collect?
> [...] Depending on your preferred telemetry settings, GitHub Copilot may also collect and retain the following, collectively referred to as “code snippets”: source code that you are editing, related files and other files open in the same IDE or editor, URLs of repositories and files path.
> What data does Copilot for Business collect?
> [...] GitHub Copilot transmits snippets of your code from your IDE to GitHub to provide Suggestions to you. Code snippets data is only transmitted in real-time to return Suggestions, and is discarded once a Suggestion is returned. Copilot for Business does not retain any Code Snippets Data.
https://github.com/features/copilot
say, if training is determined to be fair use
https://docs.github.com/en/site-policy/privacy-policies/gith...
Maybe I rely too much on the community to red flag these things. I don't install questionable extensions. I wouldn't have tested copilot at all if it hadn't received such enthusiastic support (here, among other places). The fact that it isn't sandboxed to the document you're working on should make it an absolute malware pariah, and this is the first I'm hearing of it.
self-hosting solves those problems: if done right, it gives me a thing which is static until i explicitly choose to upgrade it, so i can actually integrate it into more longterm workflows. if enough others also do this, there’s some expectation that when i do upgrade it i’ll have a few options (models) if the mainline one degrades in some way from my ideal.
LLMs are one of the more difficult things to self-host here due to the hardware requirements. there’s enough interest from enthusiasts right now that i’m hopeful we’ll see ways to overcome that though: pooling resources, clever forms of caching, etc.
though that too comes with its own set of privacy issues, especially when done at a larger scale with strangers on the internet as opposed to just with your personally known and trusted buddies… and rare are the people for whom the latter happen to contain enough people with strong enough hardware that that pool would be sufficient.
Personally, yes, I do host with Github, bit previously that was a very well-defined boundary - only what I deliberately committed and pushed went to them. Now, it's potentially anything in my editor, so I make sure to use another program for scratch files. I probably don't have anything I'd really care about them getting their hands on, but still, it's better not to get in a bad habit and then slip up someday, pasting in private or sensitive details without thinking.
If I can eliminate that as a potential source of mistakes, so much the better.
I know regular old LSP/Intellisense helps here but you are still often constrained to only autocompleting one token at a time, and have to type it at least partially in most cases.
For example, explicitly declared type information helps the model with predictions, so a language with more of this kind of syntax will be a better fit for the model.
Gradually, will we see languages that are only meant to be used within the context of an AI assisted IDE?
Some languages basically require an ide to be productive. I spent the first 3 years of college using vim to code java, until a kindly professor pulled me aside and told me to get with the 21st century, lol. After I got used to it I couldn't believe I didn't switch sooner.
Some old arcane 'languages' are already things I wouldn't touch without gpt. When is the last time you had to write awk? By god I will never manually write a line of awk.
Tldr; Can't imagine using it with a language that doesn't have great type checking to catch its BS, and they really need to tune how it interacts with traditional intelligence.
Been using it in VSCode with C# and Typescript. It gets in the way of the normal intellisense forcing you to use a shortcut to get out and back to intellisense.
For me this was really getting in the way because working one line at a time when you know what you need isn't its strong suite.
Stubbing out methods or even classes, or offering a "possibly correct" solution in areas you are fuzzy about is a strong point. Even stubbing out objects, methods, and etc using your existing code as a reference point...
But possible is the key. It's a bullshitter so it could randomly invent parameters or interfaces that are plausible, but not real. It also trips up on casing regularly.
All this to say; you gotta review everything it does and be on the lookout. Without the tooling help of a typed lang like c# or typescript this would be much harder.
I thought I was reaching a productive flow with this but then I loaded my proj in Rider, which didn't have copilot installed, and banged out some code and man it was frictionless in comparison.
Feel like copilot should be opt in via a shortcut, not opt out as it is. They really need to work out how to reduce the friction of using intellisense when it's the best option which it often is. But the copilot creators seem dead set on it constantly back-seat driving.
I was dealing with timezone stuff yesterday, which I have a lot of experience with, and I got Copilot to generate a bunch of code to deal with data in various timezones. I reviewed it and discovered that mixed in with all the multiplying of various numbers like 36000 and so on, it was basing Eastern time on UTC - 4, Pacific on UTC - 7, and so on. Simply by putting numbers like 4 and 7 in the code.
But of course that doesn’t take into account the difference between EST and EDT: what we call “Eastern time” is different depending on the season. Not to mention that there is a legislative push to eliminate daylight savings time, which means hardcoding these differences as integers is not a good idea.
This is a prime example of bullshit: an unambiguous solution, presented confidently, that is technically incorrect and also completely shorn of nuance.
That's a lot less than 100x, but it's way more than nothing! I don't think I'd want to give it up.
Local models are a different game though. I want not an autocomplete, i want to tell it “go do this, similarly how we did it there” and it does it. Basically, a high level dsl, that magically appears after a model looks at your codebase.
However, just yesterday in a module with quite a lot of context and types it autocompleted a function I was pondering for converting between different schema languages.
It was subtly wrong but the basic structure was correct. I had wanted to implement this function for a while but, having not really thought it through, imagined it would be much more complicated and would have required reading the ABI spec for the target. I never would have attempted it unless it had shown me the way and that it was relatively simple.
This is probably a piece of code that saves significant manual code. Copilot doesn't need to nudge me towards writing that many high leverage pieces of code to start becoming a big multiplier.
Now theoretically, I know about those things, but even I'll admit I would have messed up the syntax and probably spent 15m on regex 101 tweaking things. The ai assist is great if you take it as a suggestion of something you should look at, rather than blindly trust it
[1] https://news.ycombinator.com/item?id=35471882
[2] https://news.ycombinator.com/item?id=35471390
I hope these can be of help and answer your questions as well!
Previous experiments with Docker and QEMU: https://til.simonwillison.net/docker/emulate-s390x-with-qemu
> OSError: [Errno 38] Function not implemented
I don't want to mark them down for poor language skills but the style of the comments on the TabbyML GitHub profile suggests a rather casual approach, and when combined with a lack of any serious documentation or even basic details beyond a sketched architecture diagram, I kind of wonder... Is there any particular context others can point to that I may be overlooking?
this is enthusiast level territory that doesn't require professional window dressing at the moment
if you’re the kind of person that needs that then you aren’t the target audience yet
The idea of client side LLMs is kind of obviously a winner, who wouldn't want that and who hasn't thought of that, so this shouldn't shoot to the top on that basis.
The repo looks close to thrown together vapourware. I'm keen not to undermine their efforts since we all aspire to create great things but the fact this has risen so high with so little supporting evidence says more about the current mood here.
So all sorts of vaporware will fill that, and people will commend other people that seemingly take the initiative instead of just thinking about it
There is a huge group of people who are interested in using Copilot, but are not allowed (or don't want) to share their code with a 3rd party service.
AFAIK there is Fauxpilot and now there is this second project. Of course it got attention based on the promise/idea alone, because many people are curious whether it could be useful for them.
I tried it and it worked OK.
Is this a limitation of the hosted demo or the chosen model, or do I simply have to wait a bit until my favorite niche language is supported?
But there's nothing in the introductory materials about how to train this thing.
Which is pretty entertaining given how many of these companies host their code on Github already.
Or am I misunderstanding the idea here?
In which context is it learning the language models of what?
If it's learning the language models using a different context than the context of the company I work for, then it's learning not learning anything relative tho the codebase that's important to me. So what use it is?
Generally speaking, companies have their own libraries and their own style of coding. Having a language model of how someone at facebook is coding their javascript isn't going to help me at all with generating useful completions for my FORTRAN code against some 20 years of legacy code on my company's own codebase. But training it locally on the 20 years worth of legacy code sounds useful.
That's what "in context" learning is. The input to the model will be code from your company. This input will have enough information for the model to do autocomplete/etc.
My main problem with copilot is latency/speed - I would shell out for 4090 if it meant I could use local copilot model that's super fast/low latency/explores deep suggestions.
That said, local solutions always tend to be lower latency than cloud ones just because you get to skip the network.
I restrict all usage of AI tools trained from publicly-sourced data because of an unknown copyright restriction, general unease, and lawsuits; however if this can be trained solely on my own codebases that are of clean providence, I can be 100% guaranteed against potential lawsuits.
Copilot is a cool tool, but super scary from a legal perspective. And even more heavily regulated industries (that I'm not in) would absolutely need their own firewalled version.
> https://tabbyml.notion.site/Compensation-Sheet-ad61218889ab4...
Good to know they put that out there so people can avoid them.
GPT-4 can autogenerate most code a business needs, just need a lone engineer to keep it in check.
1) No support for the plain C
2) No support for Vim/NeoVim