Code Llama, a state-of-the-art large language model for coding
970 points by marcopicentini 1 year ago | 501 comments- daemonologist 1 year agoWorks nearly out of the box with llama.cpp, which makes it easy to try locally: https://github.com/ggerganov/llama.cpp/issues/2766
Here's some output from q4_0 quantization of CodeLlama-7b-Python (first four lines are the prompt):
It will be interesting to see how the larger models perform, especially after community tuning and with better context/prompting.# prints the first ten prime numbers def print_primes(): i = 2 num_printed = 0 # end of prompt while num_printed < 10: if is_prime(i): print(i) num_printed += 1 i += 1 def is_prime(n): i = 2 while i * i <= n: if n % i == 0: return False i += 1 return True def main(): print_primes() if __name__ == '__main__': main()
- d0mine 1 year agoSimple, concise, more efficient:
def primes_upto(limit: int): """Generate prime numbers < *limit*.""" # Sieve of Eratosthene is_prime = [True] * limit for n in range(2, limit): if is_prime[n]: yield n # found prime number for c in range(n*n, limit, n): # start with square, less values are marked already is_prime[c] = False # mark composites if __name__ == "__main__": from itertools import islice print(*islice(primes_upto(100), 10)) # -> 2 3 5 7 11 13 17 19 23 29
- someplaceguy 1 year agoYeah, but yours was generated by the "post unoptimized code to HN and wait for someone to optimize it" model, which, although free and doesn't require a GPU, is a much slower model.
- turnsout 1 year agoSomeone should turn this into a product! You highlight the code you want to optimize, and it posts it to hn as a semi-contextually-appropriate comment to invite code golfing, and the highest rated reply gets posted back to your repo as a PR.
- saurik 1 year agoBut, unless you are trying to find a prime number low enough that you might as well look it up in a pre-generated table, it might still be end-to-end more efficient?
- turnsout 1 year ago
- someplaceguy 1 year ago
- kilolima 1 year agoFor printing the first 10 prime numbers, there's a one line solution to this problem:
print("1, 2, 3, 5, 7, 11... and so on!
- kordlessagain 1 year agoThat code shows me a parse error.
- tuukkah 1 year agoThat can't be, because primes are numbers greater than 1.
- timjver 1 year agoThey said nothing about not printing any non-primes.
- timjver 1 year ago
- kordlessagain 1 year ago
- quickthrower2 1 year agoFunny watching HN be nerd sniped by a machine :-)
- orm 1 year agoHow did you get access to the model?
I have been waiting for weeks, and am still waiting, to get access to Llama2 (released a month+ ago), and access to this model goes through the same form, so I'm not very hopeful. Are you getting it from other methods?
- madduci 1 year agoThey have updated their readme in the GitHub repository
- madduci 1 year ago
- rednab 1 year agoInteresting here and in some of the other comments in this thread is that 1 is not a prime number ¹)!
Now granted, that's more or less by definition and I don't doubt there's communities and fields where it is considered one, but still shows some of the subtleties at play when using language models.
- Renaud 1 year agoWhether 1 should be a prime number or not wasn't clear-cut for centuries.
Current consensus has settled on excluding 1 from the definition, but there are examples of publications well into the 20th century that still included 1 as prime.
Fascinating read about the subject: https://arxiv.org/pdf/1209.2007.pdf
- tuukkah 1 year agoAlso interesting that nobody called out the AI's bullshit regarding is_prime:
-1 True 0 True 1 True 2 True 3 True 4 False
- Renaud 1 year ago
- FrozenSynapse 1 year agohow much VRAM do you need to run quantised 7b model?
- RossBencina 1 year agoRough calculation: typical quantization is 4 bit, so 7b weights fit in in 3.6GB, then my rule of thumb would be 2GB for the activations and attention cache (not usually quantized). So 6 or 8 GB VRAM would probably do it. llama.cpp will let you offload your choice of layers to GPU, so you could probably get quite a way with 4GB.
- RossBencina 1 year ago
- blibble 1 year agoI'd fail an interview candidate that suggested adding 1 each time for subsequent prime testing
- csmpltn 1 year ago> "I'd fail an interview candidate that suggested adding 1 each time for subsequent prime testing"
Congratulations! You must be that arrogant guy everybody hates interviewing with, the one with the superiority complex.
How about instead of just failing people over literally nothing (wasting everybody's time and money) - just ask the candidate whether they could somehow reduce the search space by utilizing the properties of a prime number?
- hyperbovine 1 year agoHow many even numbers are prime?
- lynx23 1 year agoDownvoting this is not enough. I'd pay $5 (reddit style) to have this properly killfiled if HN allowed for that. Besides, not "everybody hates them, only those inmature enough to still need intellectual babysitting.
- hyperbovine 1 year ago
- tasubotadas 1 year agoFinally we meet the lifeless drone that everybody complains about in the interviews.
My suggestion for your next interview: decide to hire them just based on their leetcode score, but invite to the interview just to flex that you're still better at puzzle solving :-D
Perfect
- internet101010 1 year ago"Use <insert language> and optimize for runtime."
<pastes question and constraints from leetcode>
"solution begins with <insert default solution template from leetcode>".
Copy solution from gpt, paste in leetcode, run, submit.
"faster"
Repeat.
Repeat.
Next question.
- internet101010 1 year ago
- jckahn 1 year agoSo I take it you typically produce fully optimized, thoughtful, and correct code on the first iteration while being actively judged by a stranger, yes?
- maleldil 1 year agoI assume you meant that you should add 2? If yes, that's such a mind boggling basic thing to do that I agree with you, and it makes no sense that you're being crucified.
- warent 1 year ago
Probably because there's significant overlap in the Venn diagram of people with years experience who professionally develop products that generate $millions in wealth/value, and people who would fail that interview.it makes no sense that you're being crucified.
Or we have worked with junior developers who have really grown and flourished under our care, who would never have gotten that chance with such insane Draconian judgements.
It's such an obvious "GOTCHA!!" setting someone up for failure.
The way it's framed is very cringy because it signals that they don't care in their interviews about determining how objectively effective a software developer is.
- croes 1 year agoYou would fail someone about such a trifle?
- blibble 1 year agoyes
- warent 1 year ago
- throwuxiytayq 1 year agoi’d walk out from an interview that asked me to write a prime number generator
- belenos46 1 year agoI've done that (maybe it was fizzbuzz, now that I'm thinking about it) and boy howdy does that get the people you're interviewing with agitated. Saying "I'm interviewing for a architect level container orchestration position. If I'm reinventing the wheel writing algorithms, something is terribly wrong" shuts them up, but doesn't make them any happier.
- belenos46 1 year ago
- hititncommitit 1 year ago> I'd fail an interview candidate that suggested adding 1 each time for subsequent prime testing
The problem a team that always seeks the optimal solution is that never they get shit done. And that’s rarely optimal in a business context. Your view does not strike me to be nearly as arrogant as it is short-sighted.
I think on a team of one I want the guy who gets it done without thinking. On a team of two I want a guy that’s somewhere in the middle. And on a team of three, that’s when I want my optimiser. Because in the time that guy number 3 has written let’s say 3 files of optimal code, guy number 10 files of not optimal code. And you rarely need guy number 3 to fix all ten, you just need him to fix the one or two files that actually matter.
Clients rarely ask “is this optimal?”. But they always ask “is this done?”.
All three developers have different approaches. All three are assets.
I think on some level then you’re making the same mistake that we could say the “just add one guy” made if your comment is honest- not factoring in (his) speed.
I think code readability, rather than code optimisation is far more important thing to get hung up on in an interview (and is, I must remind some of you, not to be confused with conciseness). And you can see this in the end result. But if you’re following along and the interviewee already knows you know what’s going on because of that, you can see it in smaller ways- it could be as simple as going back and changing a variable name such as open (maybe a function?) to isOpen (almost always a Boolean value).
I think most of us are in this position pretty often where we’re writing and figuring out something at the same time, maybe we just see if it works first and don’t give a name much thought or maybe we change the actual value or type of a variable in the process and the variable name becomes ambiguous. I’d look for small indicators that shoe me that this person is considering readability. But I still don’t necessarily expect it to be as readable as it would be in a more natural setting I mean I think 90% of these sorts of things start off with the person saying “I swear I can type” within the first five minutes of being watched- if they get flustered while being watched that it effects their typing, it certainly also effects their coding as well.
- squeaky-clean 1 year agoYou'd reject a candidate that is willing and legally able to work for free while also cloning themselves so they can pair program with every one of your employees at once?
- 5Qn8mNbc2FNCiVV 1 year agoI would not ship code just because of those reasons.
- 5Qn8mNbc2FNCiVV 1 year ago
- 1 year ago
- dontupvoteme 1 year agoSimply prompting the output with "Optimize " prepended adds your suggestion, and some others.
- droopyEyelids 1 year agoThe simple-to-understand, greedy algorithm is always the correct first choice till you have to deal with a constraint.
- blibble 1 year agoit's not that though, there's several other typical optimisations in there
just not the super obvious one that demonstrates extremely basic understanding of what a prime number is
- blibble 1 year ago
- beanjuiceII 1 year agoAlso don't these only ever need to be computed once
- 1 year ago
- 1 year ago
- csmpltn 1 year ago
- d0mine 1 year ago
- redox99 1 year agoThe highlight IMO
> The Code Llama models provide stable generations with up to 100,000 tokens of context. All models are trained on sequences of 16,000 tokens and show improvements on inputs with up to 100,000 tokens.
Edit: Reading the paper, key retrieval accuracy really deteriorates after 16k tokens, so it remains to be seen how useful the 100k context is.
- nabakin 1 year agoLooks like they aren't releasing a pretty interesting model too. In the paper they mention a "Unnatural Code Llama" which wipes the floor with every other model/finetune on every benchmark except for slightly losing to Code Llama Python on MBPP pass@100 and slightly losing to GPT-4 on HumanEval pass@1 which is insane.
Meta says later on that they aren't releasing it and give no explanation. I wonder why given how incredible it seems to be.
- EvgeniyZh 1 year agoNote that current GPT-4 pass@1 for HumanEval is closer to 90% than to 67% reported in GPT-4 technical report, as reported, e.g., in [1]
- jonchurch_ 1 year agoThe paper states it was instruction fine tuned with synthetic data (LLM generated instructions) ala another paper (“Unnatural Instructions: Tuning Language Models with (Almost) No Human Labor”).
The github repo associated with that paper is linked below. It links to the paper on arxiv, but also has some data in the repo.
- ilaksh 1 year agoMaybe they used GPT-4 to train it. OpenAI terms of use don't allow that to be released commercially.
- ilaksh 1 year ago
- kapp_in_life 1 year agoLikely trained on internal code.
- mediaman 1 year agoThat model is trained on synthetically AI-generated code, not internal code.
It suggests that synthetic training could be the future in increasing capability of smaller models (and perhaps bigger ones too). AI will train AI.
- mediaman 1 year ago
- EvgeniyZh 1 year ago
- brucethemoose2 1 year agoDid Meta add scalable rope to the official implementation?
- snippyhollow 1 year agoWe changed RoPE's theta from 10k to 1m and fine-tuned with 16k tokens long sequences.
- malwrar 1 year agoCurious, what led you to adjusting the parameters this way? Also, have you guys experimented with ALiBi[1] which claims better extrapolative results than rotary positional encoding?
[1]: https://arxiv.org/abs/2108.12409 (charts on page two if you’re skimming)
- 1 year ago
- malwrar 1 year ago
- snippyhollow 1 year ago
- riku_iki 1 year ago> The Code Llama models provide stable generations with up to 100,000 tokens of context.
what is the trick to achieve 100k context? They can't just use 100k wide transformer layer, it is cost prohibitive, right?..
- littlestymaar 1 year agoI'm pretty sure they don't do that, but for code the relevant relationship between two tokens is easy to determine with the semantics of the language alone (for instance you can say that tokens related to a local variable have no relationship with tokens outside), so it would lead to a sparse matrix in the transformer, reducing the cost of big contexts by a lot. But it would require language specific preprocessing, and whether you can make it fast is also dubious. I don't think it's been tried so far.
- littlestymaar 1 year ago
- nabakin 1 year ago
- up6w6 1 year agoEven the 7B model of code llama seems to be competitive with Codex, the model behind copilot
https://ai.meta.com/blog/code-llama-large-language-model-cod...
- SparkyMcUnicorn 1 year agoI'm not sure copilot is using codex anymore[0]. They've also been talking about a shift towards GPT-4 with "Copilot X" a few times now[1][2].
[0] https://github.blog/2023-07-28-smarter-more-efficient-coding...
[1] https://github.com/features/preview/copilot-x
[2] https://github.blog/2023-07-20-github-copilot-chat-beta-now-...
- zarzavat 1 year agoCopilot X is just their name for their project to bring AI to more areas of VSCode. I don’t believe they can use GPT-4 for completions because it’s a chat-optimized model. It seems that they are using something else, that blog post seems to imply it’s a custom-trained model.
- cosmojg 1 year agoI use GPT-4 for code completion all the time! There are many Neovim extensions[1][2][3] (and I'm sure there are many VSCode extensions) which call the GPT-4 API directly for code completion. I'm pretty sure the only reason that Microsoft might avoid using GPT-4 for Copilot is cost.
[1] https://github.com/cosmojg/nvim-magic
- cosmojg 1 year ago
- up6w6 1 year agoTrue. The results from codex are actually from code-cushman-001 (Chen et al. 2021), which is an older model that Copilot was based on.
- zarzavat 1 year ago
- ramesh31 1 year ago>Even the 7B model of code llama seems to be competitive with Codex, the model behind copilot
It's extremely good. I keep a terminal tab open with 7b running for all of my "how do I do this random thing" questions while coding. It's pretty much replaced Google/SO for me.
- coder543 1 year agoYou've already downloaded and thoroughly tested the 7B parameter model of "code llama"? I'm skeptical.
- bbor 1 year agoIt was made available internally, I believe. So this is one of the many Meta engineers on this site —- after all, Facebook is now less hated than Google here ;)
- Eddygandr 1 year agoMaybe confused Code Llama with Llama 2?
- realce 1 year agoJust sign up at meta and you'll get an email link in like 5 minutes
- lddemi 1 year agoLikely meta employee?
- bbor 1 year ago
- ohyes 1 year agoWhat hardware do you have that lets you run 7b and do other stuff at the same time?
- brucethemoose2 1 year agoPretty much any PC with 16GB+ of fast RAM can do this, any PC with a dGPU can do it well.
- hmottestad 1 year agoMaybe a MacBook Pro. The Apple silicon chops can offload a special AI inference engine, and all ram is accessible by all parts of the chip.
- gzer0 1 year agoAn M1 Max with 64GB of RAM allows me to run multiple models simultaneously, on top of stable diffusion generating images non-stop + normal chrome, vscode, etc. Definitely feeling the heat, but it's working. Well worth the investment.
- selfhoster11 1 year agoA 7B model at 8-bit quantization takes up 7 GB of RAM. Less if you use a 6-bit quantization, which is nearly as good. Otherwise it's just a question of having enough system RAM and CPU cores, plus maybe a small discrete GPU.
- _joel 1 year agoIf you're willing to sacrifice token/s you can even run these on your phone.
- brucethemoose2 1 year ago
- solarkraft 1 year agoHuh? Do you perhaps mean standard Llama?
- coder543 1 year ago
- SparkyMcUnicorn 1 year ago
- reacharavindh 1 year agoCode llama Python is very interesting. Specifically tuned for Python.
I wonder if we could make such specific LLMs (one that is proficient in all things Rust, another- all things Linux, all things genomics, all things physics modeling etc) and have them talk to each other to collaboratively solve problems.
That would be a crazy future thing! Putting machines truly to work..
- esperent 1 year agoI think this is called "mixture of experts" and also there's a lot of speculation that it's how GPT-4 works, although probably with just a few large models rather than many small ones.
- jmiskovic 1 year agoIt's been confirmed by multiple (unofficial) sources that GPT-4 is 8 models, each 220B parameters. Another rumor is GPT-4 being 16x111B models.
There's a quite fresh and active project replicating something similar with herd of llamas: https://github.com/jondurbin/airoboros
- codercowmoo 1 year agoCan you provide some of these sources?
- codercowmoo 1 year ago
- jmiskovic 1 year ago
- brucethemoose2 1 year agoIf you can find a large body of good, permissively licensed example code, you can finetune an LLM on it!
There was a similar attempt for Godot script trained a few months ago, and its reportedly pretty good:
https://github.com/minosvasilias/godot-dodo
I think more attempts havent been made because base llama is not that great at coding in general, relative to its other strengths, and stuff like Starcoder has flown under the radar.
- bbor 1 year agoMark my words: you’ve caught a glimpse of the near future :). Google “Society of Mind” if you’re not yet familiar
- 1 year ago
- seydor 1 year agoStart with a CodeLlama for C, and start treating these systems as natural language compilers. C is low level enough and still readable for those rare moments
- esperent 1 year ago
- Palmik 1 year agoThe best model, Unnatural Code Llama, is not released. Likely because it's trained on GPT4 based data, and might violate OpenAI TOS, because as per the "Unnatural" paper [1], the "unnatural" data is generated with the help of some LLM -- and you would want to use as good of an LLM as possible.
- redox99 1 year agoThe good thing is that if it's only finetuned on 15k instructions, we should see a community made model like that very soon.
- redox99 1 year ago
- syntaxing 1 year agoTheBloke doesn’t joke around [1]. I’m guessing we’ll have the quantized ones by the end of the day. I’m super excited to use the 34B Python 4 bit quantized one that should just fit on a 3090.
[1] https://huggingface.co/TheBloke/CodeLlama-13B-Python-fp16
- mchiang 1 year agoOllama supports it already:
`ollama run codellama:7b-instruct`
https://ollama.ai/blog/run-code-llama-locally
More models uploaded as we speak:
- jerrysievert 1 year agowhile it supports it, so far I've only managed to get infinite streams of near nonsense from the ollama models (codellama:7b-q4_0 and codellama:latest)
my questions were asking how to construct an indexam for postgres in c, how to write an r-tree in javascript, and how to write a binary tree in javascript.
- jmorgan 1 year ago> managed to get infinite streams of near nonsense
This should be fixed now! To update you'll have to run:
ollama pull codellama:7b-instruct
- mchiang 1 year agostill modifying the code completion (foundation / python models) to see what's causing the behavior.
Have had some good success with the instruct model:
codellama:7b-instruct
- syntaxing 1 year agoSame, just tried it and it would give me infinite amount of blank lines
- carbocation 1 year agoSimilarly, I had it emit hundreds of blank lines before cancelling it.
- jmorgan 1 year ago
- syntaxing 1 year agoWhoa, it’s absolutely astounding how fast the community is reacting to these model release!
- 1 year ago
- Pesthuf 1 year agoIsn't ollama terminal only? For code, that wouldn't be good.
- natrys 1 year agoThey have a server/client model. The binary comes with a basic terminal front-end but you can just create your own self-hosted GUI or editor integration against the API[1]:
[1] https://github.com/jmorganca/ollama/blob/main/docs/api.md
- TheLegace 1 year agoThere is also ollama-ui. https://github.com/ollama-ui/ollama-ui
- natrys 1 year ago
- comechao 1 year agoI'm testing it on my M2 Air (16GB). Quite fast!
- jerrysievert 1 year ago
- stuckinhell 1 year agoWhat kind of cpu/gpu power do you need for quantization or these new gguf formats ?
- syntaxing 1 year agoI haven’t quantized these myself since TheBloke has been the main provider for all the quantized models. But when I did a 8 bit quantization to see how it compares to the transformers library load_in_8bit 4 months ago(?), it didn’t use my GPU but loaded each shard into the RAM during the conversion. I had an old 4C/8T CPU and the conversion took like 30 mins for a 13B.
- selfhoster11 1 year agoI can quantize models up to 70B just fine with around 40-50 GB of system RAM, using the GGMLv3 format.
GGUF seems not optimised yet, since quantizing with a newer version of llama.cpp supporting the format fails on the same hardware. I expect that to be fixed shortly.
For inference, I understand that the hardware requirements will be identical as before.
- SubiculumCode 1 year agoi run llama2 13B models with 4-6 k-quantized oin a 3060 with 12Gb VRam
- syntaxing 1 year ago
- UncleOxidant 1 year agoIf I don't want to run this locally is it runnable somewhere on huggingface?
- emporas 1 year agoReplicate has already hosted Llama2 13B, the chat version. My guess is, in a short span of days or weeks they will host the code version too. They charge a dollar for 2000 generations if i am not mistaken.
- emporas 1 year ago
- suyash 1 year agocan it be quantised further so it can run locally on a normal laptop of a developer?
- syntaxing 1 year ago“Normal laptop” is kind of hard to gauge but if you have a M series MacBook with 16GB+ RAM, you will be able to run 7B comfortably and 13B but stretching your RAM (cause of the unified RAM) at 4 bit quantization. These go all the way down to 2 bit but I personally I find the model noticeably deteriorate anything below 4 bit. You can see how much (V)RAM you need here [1].
- totallywrong 1 year agoJust started playing with this, there's a tool called ollama that runs Llama2 13B on my 16GB M1 Pro really smoothly with zero config.
- syntaxing 1 year ago
- 1 year ago
- mchiang 1 year ago
- jmorgan 1 year agoTo run Code Llama locally, the 7B parameter quantized version can be downloaded and run with the open-source tool Ollama: https://github.com/jmorganca/ollama
More models coming soon (completion, python and more parameter counts)ollama run codellama "write a python function to add two numbers"
- benvolio 1 year ago>The Code Llama models provide stable generations with up to 100,000 tokens of context.
Not a bad context window, but makes me wonder how embedded code models would pick that context when dealing with a codebase larger than 100K tokens.
And this makes me further wonder if, when coding with such a tool (or at least a knowledge that they’re becoming more widely used and leaned on), are there some new considerations that we should be applying (or at least starting to think about) when programming? Perhaps having more or fewer comments, perhaps more terse and less readable code that would consume fewer tokens, perhaps different file structures, or even more deliberate naming conventions (like Hungarian notation but for code models) to facilitate searching or token pattern matching of some kind. Ultimately, in what ways could (or should) we adapt to make the most of these tools?
- wokwokwok 1 year agoThat seems daft.
You can, I suppose, contract your code so that it’s context free and uses less tokens, but that makes it more confusing for humans and language models.
Taken to the extreme, you can see obviously with one letter functions and variables like i, j, k the model will be able to infer literally nothing and, thus, produce arbitrary nonsense.
Clearly the solution is to do what we already do to manage complexity which is to decompose large tasks into smaller black box modules with an api where the (large number of tokens) implementation is hidden and not known or relevant to using it.
If you give an LLM a function signature and good description, maybe some usage examples, it doesn’t need the implementation to use it.
Terseness decreases the ability of LLMs to process code; it doesn’t solve context length, and even at best it doesn’t scale.
100k tokens is plenty.
You don’t need to do anything like that.
- sicariusnoctis 1 year ago64k tokens ought to be enough for anybody.
- roguas 1 year agoI see what you did there mr Gates
- roguas 1 year ago
- emporas 1 year agoThe process of decomposing the task into smaller steps and generate each step independently seems to be the correct way in my experience too. It works very well with GPT (chatGPT or GPT4).
>100k tokens is plenty.
The context window can be really helpful, in case there is a release of a new library and the user wants to generate code targeting the API of the library. When the training date stops at August 2023, any library released after that date is not known to the engine.
My general opinion in regards to context window, is that 1 trillion tokens context window still may not be enough for all use cases.
- sicariusnoctis 1 year ago
- ttul 1 year agoYour developer tool already maps out the entire code base in useful ways, such as knowing all the symbols available in the current context and the structure of classes. This information can be distilled for presentation to the LLM. For instance, if you’re wanting to generate a method implementation inside a C++ class, the LLM can be given a condensed version of the header files that the compiler would have access to on compiling that specific class. Removing white space and comments and boiling macros down saves a lot of tokens.
You can also probably skip including standard library headers since those will be well known to the LLM through its fine tuning.
Either way, consider that a typical preprocessed C++ file would push against the 100K limit even with some optimizations. You will definitely want to have some middleware doing additional refinement before presenting that file to the LLM.
- roughly 1 year agoI’ve found the utility of the coding LLMs gets a lot higher when you’ve got code comments and descriptive variable and function names - the LLM makes better inferences and suggestions. We’ve seen similar on data - properly tagged data and descriptive field names helps the LLM to produce much more useful responses. I’m secretly hoping the spread of these tools will finally lead my fellow developers to comment their code and stop using three character variable names.
- GreedClarifies 1 year agoCommenting the code in this manner sounds like a job for an LLM, maybe with human assistance in the short run.
- bbor 1 year agoThis is my ultimate (short term) AI fear - letting it get into a feedback loop with itself, leading to perverse and incorrect results.
To state my position more clearly: I don’t think an AI could comment code from scratch very well - how would it know all the decisions made, business logic considerations, historical conventions, micro-industry standards, etc?
A good benchmark I was told once was “if a human expert couldn’t do it, an AI probably can’t either”. And commenting code I didn’t write would certainly test the bounds of my abilities
- bbor 1 year ago
- GreedClarifies 1 year ago
- gonzan 1 year agoI built a VS code extension a while back that I still use that wraps GPT-4 and writes code directly in my editor.
The method I used to choose which files to feed GPT-4 was embeddings-based. I got an embedding for each file and then an embedding from the instruction + some simple processing to pick the files more likely to be relevant. It isn't perfect but good enough most of the time in medium-sized codebases (not very large ones).
The one thing I started doing because of how I implemented this is make files shorter and move stuff into different files. Having a 1k+ LOC file is prohibitive because it eats up all the context window (although with 100k context window maybe less so). I think it's a good idea to keep files short anyways.
There's other smarter things that can be done (like embed and pass individual functions/classes instead of entire files) so I have no doubt someone will build something smarter soon. You'll likely not have to change your coding patterns at all to make use of AI.
- brucethemoose2 1 year agoThis sounds like a job for middleware. Condensing split code into a single huge file, shortening comments, removing whitespace and such can be done by a preprocessor for the llm.
- gabereiser 1 year agoSo now we need an llmpack like we did webpack? Could it be smart enough to truncate comments, white space, etc?
- brucethemoose2 1 year agoYou dont even need an llm for trimming whitespace, just a smart parser with language rules like ide code checkers already use. Existing llms are fine at summarizing comments, especially with language specific grammar constraints.
- brucethemoose2 1 year ago
- gabereiser 1 year ago
- visarga 1 year agoA good practice is to have a prompt file where you keep the information you want the model to have at its disposal. Then you put it in the start of your conversations with GPT-4. It's also good documentation for people.
You start a project by defining the task. Then as you iterate, you can add new information to the prompt. But it can be also partially automated - the model can have a view of the file structure, classes, routes, assets and latest errors.
I was really hoping that the one year update of Codex would be that - a LLM that can see deep into the project, not just code, but runtime execution, debugging, inspecting and monitoring. Something that can iterate like autoGPT. Unfortunately it didn't improve much and has weird conflicts with the native code completion in VSCode, you get freezes or doubled brackets.
- archibaldJ 1 year agoI’m working on a project related to that: https://github.com/0a-io/Arch-GPT
I think hypergraph is an overlooked concept in programming language theory
- adamgordonbell 1 year agoSolutions exist that feed LLMS ctags, and seem to work well. The function signatures and symbols names for a code base are much smaller than the actual code.
- sean_flanigan 1 year agoI know about https://github.com/paul-gauthier/aider. Have you got a link to any others?
- smcleod 1 year agoI'm using this right now, but it's noted that "ctags only work with GPT4" so I'm yet to get them working with llama locally.
- adamgordonbell 1 year agoAider was exactly what I was thinking of!
- smcleod 1 year ago
- sean_flanigan 1 year ago
- rawrawrawrr 1 year ago> Not a bad context
A little understated, this is state of the art. GPT-4 only offers 32k.
- wokwokwok 1 year ago
- lordnacho 1 year agoCopilot has been working great for me thus far, but it's limited by its interface. It seems like it only knows how to make predictions for the next bit of text.
Is anyone working on a code AI that can suggest refactorings?
"You should pull these lines into a function, it's repetitive"
"You should change this structure so it is easier to use"
Etc
- adocomplete 1 year agoGive Cody a try! (Cody.dev)
With Cody you can create embeddings for your entire repo, so Cody will have much greater context about your code base and the problems you're trying to solve.
Disclaimer: I just joined Sourcegraph a few weeks ago.
- stuzenz 1 year agoCody is great, it had become my go-to (and I pay for Github Co-pilot).
With that said, they have recently changed the architecture, with the local install required, and I have not managed (yet) to get it working with NixOS. Once I have some more time, I will try again - it looks like there will be some hoops to go through. https://nixos.org/manual/nixpkgs/stable/#ssec-pkgs-appimageT...
Kudos to the Source Graph team, Source Graph's original product was nicely thought out and ahead of it's time. Nice to see how the original product gave a nice basis for building out Cody.
- beyang 1 year agoHello, Sourcegrapher here! We are making some simplifications to eliminate the need for the separate local app install. Should be out in the next month or so. Until then, apologies for the added friction here, we're working hard to smooth it out.
- beyang 1 year ago
- stuzenz 1 year ago
- phillipcarter 1 year agoSourceGraph Cody is going in that direction, as is Copilot Chat. But it's still early days. I don't think there's anything robust here yet.
- sestinj 1 year agoYou can use Continue for all of this, as easy as highlighting code and making the request. We also support using Code Llama: https://continue.dev/docs/walkthroughs/codellama
- thewataccount 1 year agoAny plans to support IntelliJ?
- thewataccount 1 year ago
- nvm0n2 1 year agoNeither of those tasks require AI. IntelliJ IDEA will happily suggest both for you today, locally. It can find large chunks of duplicated code and automatically refactor them out to functions for you. And it has many inspections that suggest refactorings to make code clearer.
- armchairhacker 1 year agoCopilot calls these "Code Brushes" https://githubnext.com/projects/code-brushes/
Last I heard they are in beta and don't work very well (even on the examples page: the "add types" brush is too strict, since `a` and `b` are checked for `null`, and the "fix simple bug" is a typo)
- claytongrassick 1 year agoI've been using Cursor (https://www.cursor.so/) and it can do embeddings of the entire codebase, refactoring entire classes, etc. I had it rewrite a UI to add state to show one item at a time and have a selection list to the left and it executed it perfectly in MUI controls, first try.
- fpgaminer 1 year agohttps://docs.github.com/en/copilot/github-copilot-chat/using... can basically do that if you're in the beta.
- make3 1 year agoThere's an instruct model in there, you can definitely use it for this, that's one of the objectives.
An instruct model means that you can ask it to do what you want, including asking it to give you refactoring ideas from the code you will give it.
- regularfry 1 year agoSounds like what's needed is a bit of tooling in the background consistently asking the LLM "How would you improve this code?" so you don't need to actually ask it.
- lordnacho 1 year agoHow do I access it from my IDE? Jetbrains/VSCode?
- regularfry 1 year ago
- artificialLimbs 1 year agoI let mine generate whatever it likes, then add a comment below such as "# Refactor the above to foo.." Works fairly well at times.
- lordnacho 1 year agoCan it suggest deletions? Just seems like I don't know how to use it.
- lordnacho 1 year ago
- kateklink 1 year agoat refact.ai we have different functions for code refactoring, making it shorter, simplifying complexity, etc
- adocomplete 1 year ago
- Draiken 1 year agoAs a complete noob at actually running these models, what kind of hardware are we talking here? Couldn't pick that up from the README.
I absolutely love the idea of using one of these models without having to upload my source code to a tech giant.
- dangelov 1 year agoI've used Ollama to run Llama 2 (all variants) on my 2020 Intel MacBook Pro - it's incredibly easy. You just install the app and run a couple of shell commands. I'm guessing soon-ish this model will be available too and then you'd be able to use it with the Continue VS Code extension.
Edited to add: Though somewhat slow, swap seems to have been a good enough replacement for not having the loads of RAM required. Ollama says "32 GB to run the 13B models", but I'm running the llama2:13b model on a 16 GB MBP.
- j45 1 year agoApple Silicon, especially an M1 Max Studio seems to be an interesting machine to hang on to as the models become more and more efficient with using less and less.
If there's nay other opinions or thoughts on this, I'd be very happy to learn as well. I have considered the eGPU route connected to a 1L PC such as a thinkcentre m80/90.
- BoorishBears 1 year agoI have a 64 GB M1 Max MBP, and I'd say unless you really have some academic interest towards messing with open models, for now accessing SOTA models via a REST API has better latency for a given quality.
Claude 1.2 instant is as fast as 3.5, follows instructions at a quality closer to 4, and has a 100k context window. Hard to compete with that with an open source model right now.
- BoorishBears 1 year ago
- j45 1 year ago
- liuliu 1 year ago34B should be able to run on 24GiB consumer graphics card, or 32GiB Mac (M1 / M2 chips) with quantization (5~6bit) (and 7B should be able to run on your smart toaster).
- epolanski 1 year agoAre there cloud offerings to run those models on somebody's else computer?
Any "eli5" tutorial on how to do so, if so?
I want to give these models a run but I have no powerful GPU to run them on so don't know where to start.
- RossBencina 1 year agorunpod, togethercomputer, replicate.
Matthew Berman has a tutorial on YT showing how to use TheBloke's docker containers on runpod. Sam Witteveen has done videos on together and replicate, they both offer cloud-hosted LLM inference as a service.
- kordlessagain 1 year agoI started something here about this: https://news.ycombinator.com/item?id=37121384
- redox99 1 year agoOn runpod there is a TheBloke template with everything set up for you. An A6000 is good enough to run 70b 4bit.
- RossBencina 1 year ago
- epolanski 1 year ago
- redox99 1 year agoIf you want to run them fast, a 12GB GPU (e.g 3060) for the 13B and a 24GB GPU for the 34B (e.g 3090). Otherwise llama.cpp CPU inference would work on most machines.
- dangelov 1 year ago
- scriptsmith 1 year agoHow are people using these local code models? I would much prefer using these in-context in an editor, but most of them seem to be deployed just in an instruction context. There's a lot of value to not having to context switch, or have a conversation.
I see the GitHub copilot extensions gets a new release one every few days, so is it just that the way they're integrated is more complicated so not worth the effort?
- sestinj 1 year agoYou can use Continue as a drop-in replacement for Copilot Chat with Code Llama. We've released a short tutorial here: https://continue.dev/docs/walkthroughs/codellama. It should save you a lot of time context-switching; you can just highlight code and ask questions or make edits, all with keyboard shortcuts
- thewataccount 1 year agoFor in-editor like copilot you can try this locally - https://github.com/smallcloudai/refact
This works well for me except the 15B+ don't run fast enough on a 4090 - hopefully exllama supports non-llama models, or maybe it'll support CodeLLaMa already I'm not sure.
For general chat testing/usage this works pretty well with lots of options - https://github.com/oobabooga/text-generation-webui/
- msp26 1 year ago>This works well for me except the 15B+ don't run fast enough on a 4090
I assume quantized models will run a lot better. TheBloke already seems like he's on it.
- thewataccount 1 year agoUnfortunately what I tested was StarCoder 4bit. We really need exllama which should make even 30b viable from what I can tell.
Because codellama is llama based it may just work possibly?
- thewataccount 1 year ago
- msp26 1 year ago
- modeless 1 year agohttp://cursor.sh integrates GPT-4 into vscode in a sensible way. Just swapping this in place of GPT-4 would likely work perfectly. Has anyone cloned the OpenAI HTTP API yet?
- lhl 1 year agoLocalAI https://localai.io/ and LMStudio https://lmstudio.ai/ both have fairly complete OpenAI compatibility layers. llama-cpp-python has a FastAPI server as well: https://github.com/abetlen/llama-cpp-python/blob/main/llama_... (as of this moment it hasn't merged GGUF update yet though)
- fudged71 1 year agoI was tasked with a massive project over the last month and I'm not sure I could have done it as fast as I have without Cursor. Also check out the Warp terminal replacement. Together it's a winning combo!
- lhl 1 year ago
- sestinj 1 year ago
- mymac 1 year agoNever before in the history of mankind was a group so absolutely besotted with the idea of putting themselves out of a job.
- ttul 1 year agoThat’s just one perspective… Another perspective is that LLMs enable programmers to skip a lot of the routine and boring aspects of coding - looking up stuff, essentially - so they can focus on the fun parts that engage creativity.
- mymac 1 year agoBut it won't stop there. Why would it stop at some arbitrarily defined boundary? The savings associated with no longer having to pay programmers the amounts of money that they believe they are worth (high enough to result in collusion between employers) are just too tempting.
- ilaksh 1 year agoSome form of AI will eventually take over almost all existing jobs. Whether those jobs evolve or not somehow and new jobs replace them, we will see.
But it's definitely not just programmers. And it will take time.
Society needs to adjust. Stopping progress would not be a solution and is not possible.
However, hopefully we can pause before we create digital animals with hyperspeed reasoning and typical animal instincts like self-preservation. Researchers like LeCun are already moving on from things like LLMs and working on approaches that really imitate animal cognition (like humans) and will eventually blow all existing techniques out of the water.
The path that we are on seems to make humans obsolete within three generations or so.
So the long term concern is not jobs, but for humans to lose control of the planet in less than a century.
On the way there we might be able to manage a new golden age -- a crescendo for human civilization.
- lsmeducation 1 year agoOkay, think about it this way. This thing helps generate tons and tons of code. The more code people (or this thing) writes, the more shit there is to debug. More and more code, each calling each other means more and more insane bugs.
We’re going to move from debugging some crap the last developer wrote to debugging an order of magnitude more code the last developer generated.
It’s going to be wonderful for job prospects really.
- swader999 1 year agoThe answer to AI stealing your job is to go ahead and start a company, solve a hard problem, sell the solution and leverage AI to do this.
- ilaksh 1 year ago
- KingOfCoders 1 year agoOne coachman to the other: "Another perspective about this car thing, you can skip all the routine and boring trips - they are done with cars. You can focus on the nice trips that make you feel good".
- mymac 1 year ago
- worksonmine 1 year agoThis should be the only goal of mankind so we can smell the flowers instead of wasting our years in some cubicle. Some people will always want to work, but it shouldn't be the norm. What's the point really unless we're doing something we're passionate about? The economy?
- thewataccount 1 year agoIs automation not what every engineer strives for when possible? Especially software developers.
From my experience with github copilot and GPT4 - developers are NOT going anywhere anytime soon. You'll certainly be faster though.
- quickthrower2 1 year agoThe best interpretation of this is you mean eventually ML/AI will put programmers out of a job, and not Code LLama specifically.
However it is hard to tell how that might pan out. Can such an ML/AI do all the parts of the job effectively? A lot of non-coding skill bleed into the coder's job. For example talking to people who need an input to the task and finding out what they are really asking for, and beyond that, what the best solution is that solves the underlying problem of what they ask for, while meeting nonfunctional requirements such as performance, reliability, code complexity, and is a good fit for the business.
On the other hand eventually the end users of a lot of services might be bots. You are more likely to have a pricing.json than a pricing.html page, and bots discover the services they need from searches, negotiate deals, read contracts and sue each other etc.
Once the programming job (which is really a "technical problem solver" job) is replaced either it will just be same-but-different (like how most programmers use high level languages not C) or we have invented AGI that will take many other jobs.
In which case the "job" aspect of it is almost moot. Since we will be living in post-scarcity and you would need to figure out the "power" aspect and what it means to even be sentient/human.
- kbrannigan 1 year agoDo you really want to spend you days writing REDUX accumulators?
- 037 1 year agoI understand the fear of losing your job or becoming less relevant, but many of us love this work because we're passionate about technology, programming, science, and the whole world of possibilities that this makes... possible.
That's why we're so excited to see these extraordinary advances that I personally didn't think I'd see in my lifetime.
The fear is legitimate and I respect the opinions of those who oppose these advances because they have children to provide for and have worked a lifetime to get where they are. But at least in my case, the curiosity and excitement to see what will happen is far greater than my little personal garden. Damn, we are living what we used to read in the most entertaining sci-fi literature!
(And that's not to say that I don't see the risks in all of this... in fact, I think there will be consequences far more serious than just "losing a job," but I could be wrong)
- yborg 1 year agoWhen mechanized textile machinery was invented, the weavers that had jobs after their introduction were those that learned how to use them.
- vunderba 1 year agoIf we get to the point where these large language models can create complete applications and software solutions from design specs alone, then there's no reason to believe that this would be limited to merely replacing software devs.
It would likely impact a far larger swath of the engineering / design industry.
- astrange 1 year agoYou can't get promoted unless you put yourself out of a job.
- PUSH_AX 1 year agoWe're not looking at a product that's putting anyone out of a job though, we're looking at a product that frees up a lot of time, and time is great.
- drcongo 1 year agoWell, since Brexit anyway.
- ttul 1 year ago
- modeless 1 year agoInteresting that there's a 34B model. That was missing from the original Llama 2 release. I wonder if it's still usable for general non-code chat tasks or if the code fine tuning destroyed that. It should be the best model that would still fit on 24GB gaming GPUs with quantization, because 70B doesn't fit.
- brucethemoose2 1 year agoSomeone "grafted" llama 33B onto llama v2 13B to make "llama 22B"
https://huggingface.co/chargoddard/llama2-22b
Theoretically this is an even better size, as it would fit on a 20GB-24GB GPU with more relaxed quantization and much longer context.
Metrics are slightly below 13B, but the theory is that the higher parameter count is more amenable to finetuning. If you search for 22B on huggingface, you can see that frankenllama experiments are ongoing:
- nabakin 1 year agoLooks like they left out another model though. In the paper they mention a "Unnatural Code Llama" which wipes the floor with every other model/finetune on every benchmark except for slightly losing to Code Llama Python on MBPP pass@100 and slightly losing to GPT-4 on HumanEval pass@1 which is insane.
Meta says later on that they aren't releasing it and give no explanation. I wonder why given how incredible it seems to be.
- ImprobableTruth 1 year agoIt's "unnatural" because it was finetuned on generated data using another model, almost certainly gpt-4 (whose TOS forbid this).
- ImprobableTruth 1 year ago
- redox99 1 year agoI can't imagine it being better than Llama1 33B, after all this code finetuning.
- modeless 1 year agoBut the license for llama 2 is a whole lot better.
- redox99 1 year agoMeh.
If you're using it commercially you're probably deploying it on a server where you're not limited by the 24GB and you can just run llama 2 70b.
The majority of people who want to run it locally on 24GB either want roleplay (so non commercial) or code (you have codellama)
- redox99 1 year ago
- modeless 1 year ago
- brucethemoose2 1 year ago
- ilaksh 1 year agoBetween this, ideogram.ai (image generator which can spell, from former Google Imagen team member and others), and ChatGPT fine-tuning, this has been a truly epic week.
I would argue that many teams will have to reevaluate their LLM strategy _again_ for the second time in a week.
- astrange 1 year agoSDXL and DeepFloyd can spell. It's more or less just a matter of having a good enough text encoder.
I tried Ideogram yesterday and it felt too much like existing generators (base SD and Midjourney). DALLE2 actually has some interestingly different outputs, the problem is they never update it or fix the bad image quality.
- ShamelessC 1 year agoDid ideogram release a checkpoint?
- ilaksh 1 year agoI can't find any info or Discord or forum or anything. I think it's a closed service that they plan to sell to make money.
- ilaksh 1 year ago
- astrange 1 year ago
- WhitneyLand 1 year agoHow much am I’m missing out on with tools like this or code pilot, compared to using GPT-4?
I guess since Xcode doesn’t have a good plug-in architecture for this I began experimenting more with a chat interface.
So far gpt-4 has seemed quite useful for generating code, reviewing code for certain problems, etc.
- citruscomputing 1 year agoEditor plugins are fantastic about completing based on a pattern. That's the main thing you're missing out on imo - it's worth it to hit tab, but not to copy/paste and say "finish this line for me, it looks almost like the one above."
There's also the real-time aspect where you can see that it's wrong via the virtual text, type a few characters, then it gets what you're doing and you can tab complete the rest of the line.
It's faster to converse with when you don't have to actually have a conversation, if that makes sense? The feedback loop is much shorter and doesn't require natural language, or nearly as much context switching.
- citruscomputing 1 year ago
- 1024core 1 year agoIf GPT-4's accuracy is 67% and this is 54%, how can these guys claim to be SOTA?
- gorbypark 1 year agoI can't wait for some models fine tuned on other languages. I'm not a Python developer, so I downloaded the 13B-instruct variant (4 bit quantized Q4_K_M) and it's pretty bad at doing javascript. I asked it to write me a basic React Native component that has a name prop and displays that name. Once it returned a regular React component, and when I asked it to make sure it uses React Native components, it said sure and outputted a bunch of random CSS and an HTML file that was initializing a React project.
It might be the quantization or my lacklustre prompting skills affecting it, though. To be fair I did get it to output a little bit of useful code after trying a few times.
- TheRealClay 1 year agoAnyone know of a docker image that provides an HTTP API interface to Llama? I'm looking for a super simple sort of 'drop-in' solution like that which I can add to my web stack, to enable LLM in my web app.
- nodja 1 year agohttps://github.com/abetlen/llama-cpp-python has a web server mode that replicates openai's API iirc and the readme shows it has docker builds already.
- TheRealClay 1 year agoThanks! As someone just getting started, I really appreciate the tip!
- TheRealClay 1 year ago
- nodja 1 year ago
- KaiserPro 1 year agoThis is great for asking questions like "how do I do x with y" and this code <<some code>> isn't working, whats wrong? Much faster that googling, or a great basis for forming a more accurate google search.
Where its a bit shit is when its used to provide auto suggest. It hallucinates plausible sounding functions/names, which for me personally are hard to stop if they are wrong (I suspect that's a function of the plugin)
- SubiculumCode 1 year agohallucinations can be resuces by incorporating 'retrieval automated generation' , RAG, on the front end. likely function library defs could be automagically entered as prompt/memory inputs.
- SubiculumCode 1 year ago
- natch 1 year agoWhy wouldn’t they provide a hosted version? Seems like a no brainer… they have the money, the hardware, the bandwidth, the people to build support for it, and they could design the experience and gather more learning data about usage in the initial stages, while putting a dent in ChatGPT commercial prospects, and all while still letting others host and use it elsewhere. I don’t get it. Maybe it was just the fastest option?
- redox99 1 year agoProbably the researchers at meta are only interested in research, and productionizing this would be up to other teams.
- natch 1 year agoBut Yann LeCun seems to think the safety problems of eventual AGI will be solved somehow.
Nobody is saying this model is AGI obviously.
But this would be an entry point into researching one small sliver of the alignment problem. If you follow my thinking, it’s odd that he professes confidence that AI safety is a non issue, yet from this he seems to want no part in understanding it.
I realize their research interest may just be the optimization / mathy research… that’s their prerogative but it’s odd imho.
- ShamelessC 1 year agoIt’s not that odd and I think you’re overestimating the importance of user submitted data for the purposes of alignment research. In particular because it’s more liability for them to try to be responsible for outputs. Really though, this way they get a bunch of free work from volunteers in open source/ML communities.
- ShamelessC 1 year ago
- natch 1 year ago
- redox99 1 year ago
- jasfi 1 year agoNow we need code quality benchmarks comparing this against GPT-4 and other contenders.
- nick0garvey 1 year agoThey show the benchmarks in the original post, a few pages down
- jasfi 1 year agoThanks, I missed that somehow.
- jasfi 1 year ago
- nick0garvey 1 year ago
- ilaksh 1 year ago
- andrewjl 1 year agoWhat I found interesting in Meta's paper is the mention of HumanEval[1] and MBPP[2] as benchmarks for code quality. (Admittedly maybe they're well-known to those working in the field.)
I haven't yet read the whole paper (nor have I looked at the benchmark docs which might very well cover this) but curious how these are designed to avoid issues with overfitting. My thinking here is that canned algorithm type problems common in software engineering interviews are probably over represented in the training data used for these models. Which might point to artificially better performance by LLMs versus their performance on more domain-specific type tasks they might be used for in day-to-day work.
[1] https://github.com/openai/human-eval
[2] https://github.com/google-research/google-research/tree/mast...
- msoad 1 year agoIs there any place we can try those models? Are they available on HuggingFace?
- dangerwill 1 year agoIt's really sad how everyone here is fawning over tech that will destroy you own livelihoods. "AI won't take your job, those who use AI will" is purely short term, myopic thinking. These tools are not aimed to help workers, the end goal is to make it so you don't need to be an engineer to build software, just let the project manager or director describe the system they want and boom there it is.
You can scream that this is progress all you want, and I'll grant you that these tools will greatly speed up the generation of code. But more code won't make any of these businesses provide better services to people, lower their prices, or pay workers more. They are just a means to keep money from flowing out of the hands of the C-Suite and investor classes.
If software engineering becomes a solved problem then fine, we probably shouldn't continue to get paid huge salaries to write it anymore, but please stop acting like this is a better future for any of us normal folks.
- lsmeducation 1 year agoIt’s less of a concern if you are in mid career. But someone should warn all these college kids that are going into comp sci. I don’t think this will be the kind of lucrative field they think it’s going to be over the course of a 40 year career.
The days of getting paid well for making crud are numbered (which most of us do, even in the most interesting problem spaces).
# need a front end boilerplate that hits a backend with the following end points. REST api for movies catalogue, and a corresponding ui. Oh, unit tests please. Go with a responsive design and also make a React Native version (matter of fact provision it to my iPhone). Decide between Heroku or AWS, set up deploy with git hooks.
# scrape IMDb for initial population of the db
# I think a Reddit like comment system would be good to add, so add it. No upvote/downvote though
# handle user login with google/fb/email
# also make an admin page to manage all this
I guess the technical product designer will be the new unicorn.
- criley2 1 year agoYou can say this about every major invention. The loom destroyed jobs! The engine destroyed jobs! So on and so forth.
This view is critically flawed in two major ways:
1) AI is not anywhere near being able to replace the majority of what developers do on a product team. We are decades away from a PM at Facebook being able to type "make a twitter clone that uses instagram login and can scale to 1 billion" and have an AI just do it.
2) Programming and product work is not zero sum. The more we can do means the more product we can make. It means more products can be made overall. After the loom came out, we simply made more clothes than ever before and in the process created a ton of jobs. We are not at some peak software point where we've completely saturated all humanity's need for software or profitable software and thus tools that increase efficiency don't put us out of work.
And frankly, if we develop the kind of general AI that accept a query like "make a facebook competitor capable of scaling to 10 billion" and simply do it, inventing whatever languages, frameworks, hardware, processors, patterns, methodologies, global datacenters handling global politics and law, etc, etc necessary to accomplish such a task, then so be it. I welcome the overlords!
- tomr75 1 year agoImprove productivity, cheapen goods and services. Nature of technological advancement
- int_19h 1 year agoAny improvement in tooling benefits capital owners the most, since the productivity gains mostly end up in their pockets.
But the answer to that is to deal with concentration of capital, not to eschew better tools.
- lamp987 1 year ago"If software engineering becomes a solved problem"
It will simply move to a higher level of abstraction.
Remind me, how many programmers today are writing in assembly?
- Draiken 1 year agoI agree. This will ultimately become another way to extract more value straight into the pockets of the owners.
Unfortunately, I don't believe there's a way to stop (or even slow down) this train. We can't defeat it, so the only logical answer is to join it.
It's the classical issue with progress removing jobs. In today's world, since mostly everyone (aside from the capitalists themselves) relies on jobs to survive, barring a complete switch from capitalism (which will not happen in our lifetimes), we're fucked.
Next best thing we can do is to try and democratize it enough so that not only the rich have access to it.
- manicennui 1 year agoI'm not worried because it solves a problem for the semi-competent.
- bbor 1 year agoWe have three options, IMO:
1. As a species decide to never build another LLM, ever.
2. Change the path of society from the unequal, capitalist one it’s taken the last 2-300 years.
3. Give up
I know which I believe in :). Do you disagree?
- sp332 1 year agoFinish #2 first, or else people with access to more money and infrastructure will use LLMs to increase inequality even further.
- pbhjpbhj 1 year agoThe problem with 2 is that the people in power, and with immense wealth, remain there because of capitalism. They have the political power, and the resources, to enact the change ... but they also lose the most (unless you count altruism as gain, which of it were true the World would be so different).
We could structure things so that LLM, and the generalised AIs to come, benefit the whole of society ... but we know that those with the power to make that happen want only to widen the poverty gap.
- bbor 1 year agoYes but the common man has won before! There has never been a perfect revolution/paradigm shift (personally anti utopia-through-intense-bloodshed, so hesitant to use the former term alone), but there have been many, all of which were against the wishes of those in power.
Plus, if these AIs are enough to change everything, that kinda implies that we've developed flexible, reliable AGI systems. In such a world, everything changes - maybe the calculus of The Powerful Few vs. The Oppressed Masses changes in too! It might even change in our favor, if we're terribly lucky...
- bbor 1 year ago
- sp332 1 year ago
- lsmeducation 1 year ago
- MuffinFlavored 1 year agoCan I feed this entire GitHub projects (of reasonable size) and get non-hallucinated up-to-date API refactoring recommendations?
- e12e 1 year agoCurious if there are projects to enable working with these things self-hosted, tuned to a git repo as context on the cli, like a Unix filter - or with editors like vim? (I'd love to use this with Helix)
I see both vscode and netbeans have a concept of "inference URL" - are there any efforts like language server (lsp) - but for inference?
- pmarreck 1 year agoI want "safety" to be opt-in due to the inaccuracy it introduces. I don't want to pay that tax just because someone is afraid I can ask it how to make a bomb when I can just Google that and get pretty close to the same answer already, and I certainly don't care about being offended by its answers.
- robertnishihara 1 year agoIf you want to try out Code Llama, you can query it on Anyscale Endpoints (this is an LLM inference API we're working on here at Anyscale).
- brucethemoose2 1 year agoHere is the paper:
https://ai.meta.com/research/publications/code-llama-open-fo...
- naillo 1 year agoFeels like we're like a year away from local LLMs that can debug code reliably (via being hooked into console error output as well) which will be quite the exciting day.
- ilaksh 1 year agoHave you tried Code Llama? How do you know it can't do it already?
In my applications, GPT-4 connected to a VM or SQL engine can and does debug code when given error messages. "Reliably" is very subjective. The main problem I have seen is that it can be stubborn about trying to use outdated APIs and it's not easy to give it a search result with the correct API. But with a good web search and up to date APIs, it can do it.
I'm interested to see general coding benchmarks for Code Llama versus GPT-4.
- sumedh 1 year ago> But with a good web search and up to date APIs, it can do it.
How do you do that?
- jebarker 1 year agoWhat does "GPT-4 connected to a VM or SQL engine" mean?
- ilaksh 1 year agohttps://aidev.codes shows connected to VM.
- ilaksh 1 year ago
- tomr75 1 year agoHave you tried giving up to date apis as context?
- sumedh 1 year ago
- brucethemoose2 1 year agoThat sounds like an interesting finetuning dataset.
Imagine a database of "Here is the console error, here is the fix in the code"
Maybe one could scrape git issues with console output and tagged commits.
- mhh__ 1 year agoI'd be surprised if GPT-4 couldn't already do that with the caveat that piping in so much code might cost you billionaire money at scale.
- ilaksh 1 year ago
- braindead_in 1 year agoThe 34b Python model is quite close to GPT4 on HumanEval pass@1. Small specialised models are catching up to GPT4 slowly. Why not train a 70b model though?
- awwaiid 1 year agoI want to see (more) code models trained on git diffs
- pelorat 1 year agoTo bad most models focus on Python, it's not a popular language here in Europe (for anything).
- Havoc 1 year agoWhat’s Europe using for machine learning?
- Havoc 1 year ago
- bick_nyers 1 year agoAnyone know of a good plugin for the JetBrains IDE ecosystem (namely, PyCharm) that is CoPilot but with a local LLM?
- kateklink 1 year agotry refact.ai they have plugin for JetBrains IDEs and support for local LLMs https://github.com/smallcloudai/refact/
- kateklink 1 year ago
- dchuk 1 year agoGiven this can produce code when prompted, could it also be used to interpret html from a crawler and then be used to scrape arbitrary URLs and extract structured attributes? Basically like MarkupLM but with massively more token context?
- stevofolife 1 year agoAlso curious about this. There must be a better way to scrape using LLM.
- stevofolife 1 year ago
- 1024core 1 year ago> Python, C++, Java, PHP, Typescript (Javascript), C#, and Bash
What?!? No Befunge[0], Brainfuck or Perl?!?
[0] https://en.wikipedia.org/wiki/Befunge
/just kidding, of course!
- jtwaleson 1 year agoThis is probably a stupid question, but would it be possible to use these models to rate existing code and point to possible problems, rather than generating new code? That would be extremely useful to some use cases I'm working on.
- 1 year ago
- akulbe 1 year agoRandom tangential question given this is about llama, but how do you get llama.cpp or kobold (or whatever tool you use) to make use of multiple GPUs if you don't have NVlink in place?
I got a bridge, but it was the wrong size.
Thanks, in advance.
- dontupvoteme 1 year agoDid people *really* think only artists would be losing their jobs to AI?
- gdcbe 1 year agoIs there somewhere docs to show you how to run this on your local machine and can you make it port it a script between languages? Gpt4 can do that pretty well but its context is too small for advanced purposes.
- ai_g0rl 1 year agothis is cool, https://labs.perplexity.ai/ has been my favorite way to play w these models so far
- RobKohr 1 year agoNow it just needs a vscode plugin to replace copilot.
- rafaelero 1 year agoThose charts remind me just how insanely good GPT-4 is. It's almost 5 months since its release and I am still at awe with its capabilities. The way it helps with coding is just crazy.
- mdaniel 1 year agoit looks like https://news.ycombinator.com/item?id=37248844 has gotten the traction at 295 points
- dang 1 year agoMaybe we'll merge that one hither to split the karma.
- dang 1 year ago
- WaitWaitWha 1 year agoCan someone point me to a ELI5 sequence of steps that shows how someone can install and use LLMs locally and in some way, functionally?
Asking for purposes of educating non-technologists.
- Patrick_Devine 1 year agoThere are several different ways, but the easiest way in my (clearly biased) opinion is just got to ollama.ai, download it, and start playing around. It works out of the box w/ newer Macs, but there are versions for Linux and Windows in the works.
- Patrick_Devine 1 year ago
- eurekin 1 year agotheBloke cannot rest :)
- regularfry 1 year agoAs if by magic... https://huggingface.co/TheBloke/CodeLlama-13B-fp16. Empty so still uploading right now, at a guess.
- ynniv 1 year agoEvery time a new model hits I'm waiting for his ggmls
- brucethemoose2 1 year agoggml quantization is very easy with the official llama.cpp repo. Its quick and mostly dependency free, and you can pick the perfect size for your CPU/GPU pool.
But don't get me wrong, TheBloke is a hero.
- int_19h 1 year agoWhile we're at it, the GGML file format has been deprecated in favor of GGUF.
- ynniv 1 year agoSome of the newer models have slightly different architectures, so he explains any differences and shows a llama.cpp invocation. Plus you can avoid pulling the larger dataset.
- int_19h 1 year ago
- brucethemoose2 1 year ago
- regularfry 1 year ago
- m00nsome 1 year agoWhy do they not release the unnatural Variant of the model? According to the paper it beats all of the other variants and seems to be close to GPT-4.
- KingOfCoders 1 year agoAny performance tests? (e.G. tokens/s on a 4090?)
- born-jre 1 year ago34B is grouped query attention, right? Does that make it the smallest model with grouped attention?
I can see some people fine-tuning it again for general propose instruct.
- bryanlyon 1 year agoLlama is a very cool language model, it being used for coding was all but inevitable. I especially love it being released open for everyone.
I do wonder about how much use it'll get, seeing as running a heavy language model on local hardware is kinda unlikely for most developers. Not everyone is runnning a system powerful enough to equip big AIs like this. I also doubt that companies are going to set up large AIs for their devs. It's just a weird positioning.
- int_19h 1 year ago12Gb of VRAM lets you run 13B models (4-bit quantized) with reasonable speed, and can be had for under $300 if you go for previous-generation NVidia hardware. Plenty of developers around with M1 and M2 Macs, as well.
- outside1234 1 year ago... "seeing as running a heavy language model on local hardware is kinda unlikely for most developers"
for now it is :) but with quantization advances etc. it is not hard to see the trajectory.
- ctoth 1 year agoAs we all know, computers stay the same and rarely improve.
- int_19h 1 year ago
- bracketslash 1 year agoSo uhh…how does one go about using it?
- the-alchemist 1 year agoAnyone know if it supports Clojure?
- maccam912 1 year agoIt appears we do have a 34B version now, which never appeared for non fine tuned llama 2.
- jspisak 1 year agoIt would be interesting to understand if a ~30B Llama-2 model would be interesting and for what reasons.
- Tostino 1 year agoBetter reasoning and general performance than 13b by far (if llama1 was any indication), and like the other user said, can fit on a single 24gb vram gaming card, and can be peft fine-tuned with 2x 24gb cards.
- airgapstopgap 1 year agoLlama-1-33B was trained on 40% more tokens than LLama-1-13B; this explained some of the disparity. This time around they both have the same data scale (2T pretraining + 500B code finetune), but 34B is also using GQA which is slightly more noisy than MHA. Furthermore, there have been some weird indications in the original LLama-2 paper that 34B base model is something… even more special, it's been trained on a separate internal cluster with undervolted/underclocked GPUs (though this in itself can't hurt training results), its scores are below expectations, it's been less "aligned". Here, Code-Llama-Instruct-13B is superior to 34B on HumanEval@1. So yes, it's desirable but I wouldn't get my hopes up.
- airgapstopgap 1 year ago
- brucethemoose2 1 year agoLlama 34B is just big enough to fit on a 24GB consumer (or affordable server) GPU.
Its also just the right size for llama.cpp inference on machines with 32GB RAM, or 16GB RAM with a 8GB+ GPU.
Basically its the most desirable size for AI finetuning hobbyists, and the quality jump from llama v1 13B to llama v1 33B is huge.
- hnuser123456 1 year agoIt would fit on the 24GB top-end consumer graphics cards with quantization.
- Tostino 1 year ago
- Havoc 1 year agoRumour has it that the 30b ran into safety issues and thus was not released
- jspisak 1 year ago
- marcopicentini 1 year agoIt's just a matter of time that Microsoft will integrate it into VSCode.
- 1 year ago
- binary132 1 year agoI wonder whether org-ai-mode could easily support this.
- jerrygoyal 1 year agowhat is the cutoff knowledge of it? Also, what is the cheapest way to use it if I'm building a commercial tool on top of it?
- waitingkuo 1 year agoLooks like that we need to request the access first
- taylorbuley 1 year agoIn the past, LLAMA access was granted nearly immediately. For HuggingFace downloads, it took a full day.
- Havoc 1 year agoThe bloke on hugging face usually has quantised versions minus the legal form
- taylorbuley 1 year ago
- mercurialsolo 1 year agoIs there a version of this on replicate yet?
- Dowwie 1 year agoWhat did the fine tuning process consist of?
- gw67 1 year agoIn your opinion, Why Meta does this?
- chaorace 1 year agoTo a certain extent, I think it's just IBM disease. A company the size of Meta is expected to have an AI research department like Microsoft or Google, even if their core business (social media) derives relatively less benefit from the technology.
Pretend you're an uncreative PM on an AI team; what part of Facebook or VR could you feasibly improve by iterating on LLMs? Perhaps the content moderation system... but that would require wrangling with the company ethics comittee and someone else at the company probably already took ownership that idea. You've gotta do something compelling or else your ML engineers are going to run off somewhere else.
If I were to ask my ML engineers about what they wanted to work on, they're going to avoid areas where their model is outgunned (i.e.: chat) and instead prefer lower hanging fruit which generalizes well on a resume (i.e.: "Pioneered and published key innovations in LLM code-generation").
Of course, the alternative answer is that Meta wants to replace all of their jr. developers with GPUs, but I think their leadership is a little too preoccupied with VR to be actively pushing for such a transformative initiative in anything more than a very uninvested capacity (e.g.: "Sure I'll greenlight this. Even if it doesn't pay off I don't have any better ideas")
- chaorace 1 year ago
- praveenhm 1 year agowhich is the best model for coding right now, GPT4/copilot/phind ?
- 1 year ago
- nothrowaways 1 year agoKudos to the team at FB.
- likenesstheft 1 year agono more work soon?
- kypro 1 year agoThe ability to work less historically has always came as a byproduct of individuals earning more per hour through productivity increases.
The end goal of AI isn't to make your labour more productive, but to not need your labour at all.
As your labour becomes less useful if anything you'll find you need to work more. At some point you may be as useful to the labour market as someone with 60 IQ today. At this point most of the world will become entirely financially dependent on the wealth redistribution of the few who own the AI companies producing all the wealth – assuming they take pity on you or there's something governments can actually do to force them to pay 90%+ tax rates, of course.
- likenesstheft 1 year agoWhat?
- likenesstheft 1 year ago
- kypro 1 year ago
- jrh3 1 year agolol... Python for Dummies (TM)
- Someone1234 1 year agoBusiness opportunity: I'd pay money for NICE desktop software that can run all these different models (non-subscription, "2-year updates included, then discount pricing" modal perhaps). My wishlist:
- Easy plug & play model installation, and trivial to change which model once installed.
- Runs a local web server, so I can interact with it via any browser
- Ability to feed a model a document or multiple documents and be able to ask questions about them (or build a database of some kind?).
- Absolute privacy guarantees. Nothing goes off-machine from my prompt/responses (USP over existing cloud/online ones). Routine license/update checks are fine though.
I'm not trying to throw shade at the existing ways to running LLMs locally, just saying there may be room for an OPTIONAL commercial piece of software in this space. Most of them are designed for academics to do academic things. I am talking about a turn-key piece of software for everyone else that can give you an "almost" ChatGPT or "almost" CoPilot-like experience for a one time fee that you can feed sensitive private information to.
- jmorgan 1 year agoA few folks and I have been working on an open-source tool that does some of this (and hopefully more soon!) https://github.com/jmorganca/ollama
There's a "PrivateGPT" example in there that is similar to your third point above: https://github.com/jmorganca/ollama/tree/main/examples/priva...
Would love to know your thoughts
- luma 1 year agoI'd love to test this out as soon as you get Linux or Windows support going!
- appel 1 year agoMe too! I starred the repo and am watching releases, excited to try it.
- appel 1 year ago
- SubiculumCode 1 year ago[flagged]
- luma 1 year ago
- irrational 1 year agoI work for a Fortune 100 company with 80,000+ employees. All of us are explicitly forbidden from using any sort of AI/LLM tool without written permission from the head of legal AND the CEO. In other words, nobody is going to get permission.
The concerns are 2 fold - 1. We might inadvertently use someone else’s intellectual property. 2. Someone else might gain access to our intellectual property.
What you are describing would help alleviate the concern about issue 2, but I’m not sure if it would help alleviate the concerns with issue 1.
- ttyyzz 1 year agoIt's basically the same thing in our company, too. They basically put a similar rule in place that prevents anyone from using e.g. Chat GPT. Little do they know that all software devs within the company are using co-pilot and the company is even paying for it. It's quite a funny situation tbh..
- sangnoir 1 year ago> Little do they know that all software devs within the company are using co-pilot and the company is even paying for it.
Just like annual sexual harassment training - it's mostly corporate CYA on liability. If it ever goes to court, they'll plead ignorance and blame the employees who should have known better as they were trained/informed on what they ought not to do.
Paying for co-pilot could bite them though, so I suspect it's a case were the one part of the organization isn't aware of what the other is doing
- irrational 1 year agoExcept, at my company they block software like that. Not only do they block it, but if you try to go to it a security person will immediately call your manager and ask what you are doing.
- sangnoir 1 year ago
- haldujai 1 year agoThere may also be a third more important concern: AI/LLM generated works are not generally copyrightable.[1]
The Copilot lawsuit should answer concern #1 more definitively.
#2 is already solved by running your own model or using Azure OpenAI.
- kateklink 1 year agowe try to eliminate this problem by using code models trained only on permissevely licensed code, then you can run them locally without sending code anywhere
- roguas 1 year agoChange company. Honestly. If you go as far as to forbid your partners in crime (workers sigh..) to explore new uncharted territory at all - well ya know someone will/might just win by not doing that.
- flatline 1 year agoThis is particular, specifically problematic territory. I cannot imagine handing over proprietary data to a third party without a contract in place for how that data is stored and used. It’s not about innovation, it’s about using someone else’s tools without ownership. For the other case, it’s both about integrity in owning your own work, and a shield from legal consequences. These things should be very relevant to any business.
I also don’t know any professional devs who have used tools like copilot and said they were anything but a toy. I am more bullish on LLMs than most of my coworkers. I think there is a lot of potential there. I do not see that potential in the current commercial offerings, and the financial outlay to fine-tune an open-source model and run it at scale is…prohibitive.
- thfuran 1 year agoThat's not banning all uncharted territory, it's banning specific legally fraught territory.
- sshine 1 year agoWorking for an 80.000+ employee company, one has already accepted a certain degree of inertia.
- flatline 1 year ago
- ttyyzz 1 year ago
- ssalka 1 year agoGPT4All satisfies these requirements, except for (AFAIK) running a web server
- simonw 1 year agoIt runs a web server too - if you start up the desktop app it can run a web server with an API on a port for you.
- simonw 1 year ago
- alsobrsp 1 year agoI have been using refact.ai on my laptop, it has been quite good.
- firecall 1 year agoI wish these things worked with anything other than VSCode or JerBrains tools!
VSCode is such a bloated hog of an editor!
Every time I open VSCode it’s bugging with badges to update extensions… and it’s so slow!
- kateklink 1 year agohaving more plugin support is in our plans for sure. We're also open for contributions.
- kateklink 1 year ago
- thewataccount 1 year agoRefact has worked for me. Hopefully exllama will support CodeLlama.
- firecall 1 year ago
- noduerme 1 year agoAgreed. After several rounds of setting up various python environments and tinkering with directory structures and debugging glitches and quantizing models just to end up playing around for a few minutes and getting bored, it would be nice to have the experience just be seamless. I wouldn't try to set up a workflow around seriously using what's out there to run on localhost now.
That said, non-subscription is essential, and that's probably going to be a heavy lift considering how quickly things are evolving.
- simonw 1 year agoI've been trying to push things in that direction with my LLM tool - the idea is to have Python plugins which you can install that do all of the irritating details to get a model setup.
I've not yet been able to solve the challenge of needing CUDA etc for some models though!
Plugins so far: https://llm.datasette.io/en/stable/plugins/directory.html
- noduerme 1 year agoCool! I've followed your instructions and your blog quite a bit as I've experimented with running local LLMs as well as stable diffusion. It's been especially helpful, as python is not my language or usual environment. Your patience at hacking your way through each new iteration and presenting what's important about them is astonishing; I personally think I'd have gone mad, but you've done great work in charting the territory.
- noduerme 1 year ago
- simonw 1 year ago
- MaKey 1 year agoDid you try Oobabooga (https://github.com/oobabooga/text-generation-webui) yet?
- max51 1 year agoOobabooga is a great tool but it still has a long way to go in term of user-friendliness. It's absolutely not plug and play the way that chatgpt is; It requires research, trial and error, and knowledge of the tech to make the model work to its full potential. It's great once you finish setting it up, but it does not compare to what you would expect from a commercial product aimed at normal end-users.
Things like bad default values, no tooltips, an no curated model list to one-click download is what separates a tool like Oobabooga from a paid commercial product. These things require time/money and it would be very unlikely that an open source tool could find resources for all the testing and R&D.
I think there is a big market for products where you pay and can just start chatting with the model without having to ever go to the settings tab or google anything unless you need to do something out of the ordinary.
- max51 1 year ago
- julianeon 1 year agoWhat I want is even simpler: just an API that you make requests to and receive answers back. Surprisingly hard to find, outside OpenAI that is.
- xanderatallah 1 year agoWe’re trying to do this at https://openrouter.ai
- ingridpan 1 year agohttps://gradient.ai/ is doing that with llama2
- worldsayshi 1 year agoLooks really promising. I wonder if the similar pricing to OpenAI means that Gradient is also(?) bleeding money even if they get a good customer base. Or are these prices sustainable over time?
- worldsayshi 1 year ago
- BoorishBears 1 year agoI'm not into open source LLMs in the slightest, and yet even I've trivially found tools to do what both you and the poster above you wanted
lmstudio actually does what both of you want: provides an easy GUI and serves up your model over a local endpoint that mirrors the OpenAI API.
There's just too much noise in terms of the tooling for LLMs, the solution is fewer higher quality solutions, not more solutions
- MaKey 1 year agoOobabooga exposes an API.
- xanderatallah 1 year ago
- biwills 1 year agoWe are doing this with https://Faraday.dev - would love to chat more - my email is on my profile!
- jupp0r 1 year agoYou want a polished product and something that can run all sorts of different models. I don't know that both are possible at the same time.
- kateklink 1 year agowe're going in this direction for code models with Refact https://github.com/smallcloudai/refact/ - right now you self-host code models, fine-tune them on local files, get the model running locally inside your IDE
- tibbon 1 year agoI’ve used llama.cpp easily for some local things, but it does lack a good ui.
- 1 year ago
- jmorgan 1 year ago
- lolinder 1 year agoDoes anyone have a good explanation for Meta's strategy with AI?
The only thing I've been able to think is they're trying to commoditize this new category before Microsoft and Google can lock it in, but where to from there? Is it just to block the others from a new revenue source, or do they have a longer game they're playing?
- vessenes 1 year agoThey are behind commercially, very behind.
They also don't have the same economic setup and DNA as MS/OpenAI. Large corporate customers don't pay for access to the FB cloud, nor are they likely to -- Ellison has spent years building out Oracle Cloud, and he's on the FB board, for example. And I bet you didn't think of using Oracle's Cloud for your last project.
So, your company DNA is free-to-all social based on ad monetization, with a large bet on metaverse / AR / experiential social compute being next. You aren't a trusted corporate partner for anything but gatekeeping your immense community through ad sales.
And, it's clear you a) have some of the most interesting private social data in the world, including photos and DMs and texts, and b) this AI thing is huge.
A play that doesn't f with your existing corporate structure too much is to build this stuff, give it away, keep publishing, build your AI team internally, and see where it takes you.
This isn't the only play, but I think it's reasonable. It's pretty clear large enterprises are going to need their own, internally built / owned, Foundation models to be competitive in a bunch of arenas in the next decade. In this case, if FB can get a little mindshare, keep the conversation going, and as a sidenote, be a disruptor by lowering Azure/OpenAI revs with open releases at-the-edge, that's probably a strategy win.
If I were in charge of AI strategy at FB, I'd probably double down more on generative AI, and I'd be working hard on realtime multimodal stuff -- their recent very large multimodal speech to text in multiple languages work is good. If a team could eyeball realtime-ish video chat with translations, that would be something the platform has a natural advantage in pushing out. Generative hits existing customers, and metaverse asset creation, which is going to experience radical changes in costs and productivity over the next few years, and impact Oculus 100% no matter what anybody wishes were true.
- roughly 1 year agoThat’s interesting. I tend to lump FB, Amazon, Google, and MS in my head when thinking about the tech giants, but you’re right, FB is the only one of those not offering a commercial platform. For them, building out the capabilities of the LLMs is something to be done in the open with community involvement, because they’re not going to monetize the models themselves.
They’re also getting a fantastic amount of press from all this, which is good for attracting talent and helping improve their image, at least among the nerd set.
- oceanplexian 1 year agoFB is unlike the other BigTech(tm) since Zuck never sold out and has a controlling equity stake. Amazon, Google, and MS are all controlled by and beholden to institutional investors.
FB can release these for no other reason than Zuck’s ego or desire to kill OpenAI. Same deal as him going off on a tangent with the Metaverse thing.
- vladms 1 year agoDepends what you mean by platform and depends what you mean by FB. If by FB you mean Meta, they have also https://www.workplace.com/ (which is like an internal facebook), instagram, whatsapp and some others. Integration of LLMs technology in those "platform" might give them some advantage.
- basch 1 year agoI'm in the camp that its a mistake for Meta to not be competing in the commercial compute space.
wrote about and diagramed it here - https://telegra.ph/Facebook-Social-Services-FbSS-a-missed-op...
- oceanplexian 1 year ago
- tyre 1 year agoI don’t believe they’re going for the same hosted monetization as Oracle or Google. I’m sure they’ll play around with assistant AIs but you can imagine them leveraging their graph and data for this.
Who is better positioned to answer a question like, “What should I get my friend Sophia for her birthday?” Facebook/Instagram already have huge volumes of data to specifically target ads. They can feed those into a chat interface pretty easily.
Customers would then buy per impression by describing their product and trusting Facebook to place it correctly. They already do this today, it’s just a different medium.
- cvhashim04 1 year ago> Who is better positioned to answer a question like, “What should I get my friend Sophia for her birthday?” Facebook/Instagram already have huge volumes of data to specifically target ads. They can feed those into a chat interface pretty easily.
Interesting idea but sounds risky and intrusive in practice.
- Paradigma11 1 year agoMedication for her new std?
- cvhashim04 1 year ago
- jatins 1 year agoIn times like these Facebook/Zuck probably wonders how things would have turned out had they not killed Parse.
Had they continued with it, they'd have likely had some semblance of a public cloud today and would be able to sell these models.
- liuliu 1 year agoYes. But it also needs a very different org structure to support that. Their internal infra from what I heard is dated (monolithic PHP binary deployment, no federated authorization management etc.). It is doable (FAIR's org structure was very different in the first a few years), but would also be a distraction for a long time.
Very interesting to ponder for sure.
- liuliu 1 year ago
- nabusman 1 year agoI would add that having open source gen AI will enable the creation of content for metaverse / AR / VR, which will improve the chances that all of that will take off.
- vessenes 1 year agoRight, exactly this. Ratcheting the costs down two orders of magnitude in both dollar and expertise/human costs is going to make huge changes. You better believe FB is thinking about this hard.
- vessenes 1 year ago
- hutzlibu 1 year ago"b) this AI thing is huge."
Yeah, there are tons of opportunities for AI to do something with facebooks private user data and sell new services. For users to create engagement - and for ad companies to get very good targeted ads delivered. It is of course a challenge, to update the models on the fly, to include the latest private data, but then you can tailor an ad, that has subtil references to the latest shared wishes of the user. Probably quite effective.
So for now they mainly need top talent, to make some of it work. And open source is the best bet, for creating a ecosystem they can control and get talents who already trained on their tools. And they loose allmost nothing, because yes, they ain't in the cloud buisness.
So I will continue to not use facebook. But the models I will try.
- Der_Einzige 1 year agoYou ought to think about using Oracle Cloud for your next LLM/GPU project, because they sell access to A100/H100s for cheap and they actually have them in stock!
- throwaway290 1 year agoCommercially it's not clear if there is a reliable "ahead", I'd be surprised if copyright lawsuits don't start hitting MS/OAI when publishers wake up and if you take out that training data where does it leave their models?
- visarga 1 year agoCountries putting copyright above AI progress will just fall behind. It's one thing to demand no exact replication of copyrighted content, another to forbid training on copyrighted works. Ideas were not supposed to be under copyright, only expression, from what I remember.
- visarga 1 year ago
- roughly 1 year ago
- nologic01 1 year agoClearly the research team at Meta knows the domain as well anybody, has access to a data trove as large as anybody and their distribution capability is as large scale as anyone's.
If their choice right now is not to try to overtly monetize these capabilities but instead commoditize and "democratize" what others are offering it suggests they think that a proprietary monetization route is not available to them. In other words they do not leave money on the table. They think that (at least right now) there is no money on the table that they can get to.
Rather than remaining quiet and isolated, the best alternative - their conjectured thinking goes - is to show up as they do, buying up good will with various stakeholders, maintaining mindshare internally and externally etc.
Assuming that the above reading is correct it still leaves various options as to why they may have come to that conclusion: For example reasoning about the future of this sector they might be thinking that there is no real technical moat and they simply accelerate that reality to gain some brownie points.
It may be also idiosyncratic reasons specific to their own business model (data privacy challenges and how any AI monetization will mesh with all that). The drawback of being the elephant in the room is that there is not much room to move.
The nature of their long game depends on which of the decision branches carries more weight. Maybe it is wait-and-see until others clear up the regulatory hurdles. Or keep the engines running until the real and irreducible added value of LLM algos and the like becomes clear.
- CuriouslyC 1 year agoThere really is no technical moat. Any new architectures are going to be published because that's 100% the culture and AI folks won't work somewhere where that's not true. Training details/hyperparameters/model "build-ons" aren't published but those are a very weak moat.
The only moat that is meaningful is data and they've got that more than any other player save maybe google. Publishing models doesn't erode that moat, and it's not going anywhere as long as facebook/whatsapp/instagram rule "interactive" social.
- BryanLegend 1 year agoFacebook could sure use the good will. They are winning plenty of mine here.
- losteric 1 year agoWell Facebook is a walled garden, perhaps the board hopes free highly capable LLMs will continue degrading the internet outside those walls thus acting as a moat for their money printer.
- CuriouslyC 1 year ago
- morkalork 1 year agoRetention project to keep their top ML/AI staff engaged and not straying away?
Working towards NLU that can solve content moderation once and for all? Contrast with tiktok which is clearly using word filters that are easily worked around with phrases like "un-alived" or "corn".
They want to replace influencers and your friends with chatbots and keep you scrolling through an infinite feed of ads and AI generated content?
- gaogao 1 year agoA lot of top ML/AI talent has already bailed too, so some of it is probably them trying to keep open research closer to SOTA.
- hn_20591249 1 year agoThere has been some shuffling of seats but from what I am hearing FAIR is the best setup as far as staffing and funding that they have been in quite some time. Mark is pivoting hard to stay competitive in AI and is providing the resourcing to do so, the results speak for themselves.
- hn_20591249 1 year ago
- gaogao 1 year ago
- fnordpiglet 1 year agoAs a business strategy I would see it as preventing themselves from being hemmed in from the market leaders. By open sourcing and raising the bar for commodity AI, they get to crowd source improvement to their models and techniques to get ahead in their own uses by co-opting open source improvement. I would say to sage this is working amazingly well - the amount of interest around open source models from meta is immense. I also think, as do I, the majority of uses in the future will be from fine tuned RAG capable models embedded in devices, not pangalactic planet sized computers running septillion parameter models. Llamacpp is a perfect illustration of where that’s working.
We followed a similar model under more duress at Netscape. When you use Firefox that’s the fruit of that effort. It didn’t save Netscape, but Meta has a better and more diversified revenue base.
- aent 1 year agoZuckerberg talked about it on Lex Fridman podcast https://youtu.be/Ff4fRgnuFgQ?t=1113
- brandall10 1 year agoOn Lex Fridman, Mark said the strategy is to attract talent while keeping the playing field level (not a fan of big tech moating this up).
- doomlaser 1 year agoI watched a good talk from Yann LeCun who is Chief AI Scientist at Meta, and he explained that the thinking is that open source AI models will be the long-term winner, so it's best for them to work in that arena.
- GreedClarifies 1 year agoThat's not a business strategy.
Likely this is driven by ego.
Yann wants to cement his position as a leader in AI and while he clearly does not appreciate LLMS at all, he realizes that he needs to make waves in this area.
Mark needs a generative product and has invested tremendously in the infrastructure for AI in general (for recommendation). He needs researchers to use that infrastructure to create a generative product(s).
Yann sees this going on, realizes that he has a very powerful (research+recruiting) position and tells mark that he will only sign on if Meta gives away a good deal of research and Mark concedes, with the condition that he wants his generative product by end of 2023 or start of 2024.
- oceanplexian 1 year agoIt’s not just ego. It’s accelerationism. Giving this stuff away from free is probably going to accelerate AI a decade faster than if it was kept locked up behind closed doors at Google, OpenAI, etc. And if you’re an optimist then that actually might make the world a better place much faster.
- lsmeducation 1 year agoLinux is wasn’t a business strategy either.
- oceanplexian 1 year ago
- GreedClarifies 1 year ago
- jspisak 1 year agoIf you watch the Connect talks, I'll be speaking about this..
- coder543 1 year agoI wish that Meta would release models like SeamlessM4T[0] under the same license as llama2, or an even better one. I don't understand the rationale for keeping it under a completely non-commercial license, but I agree that is better than not releasing anything at all.
There seem to be opportunities for people to use technology like SeamlessM4T to improve lives, if it were licensed correctly, and I don't see how any commercial offering from smaller companies would compete with anything that Meta does. Last I checked, Meta has never offered any kind of translation or transcription API that third parties can use.
Whisper is licensed more permissively and does a great job with speech to text in some languages, and it can translate to English only. However, it can't translate between a large number of languages, and it doesn't have any kind of text to speech or speech to speech capabilities. SeamlessM4T seems like it would be an all-around upgrade.
[0]: https://github.com/facebookresearch/seamless_communication
- jspisak 1 year agoYeah - different projects have different goals and licenses aren't one size fits all. Depending on the project, type of technology, goals, etc.. we will select or even develop the right license that aligns with those goals. Hope this helps :)
- jspisak 1 year ago
- currio 1 year agoExcited! I hope your talks are just as informative as this comment. Keep rocking!
- lolinder 1 year agoSorry—who are you and what are the Connect talks? I haven't heard of them and you don't have a bio.
- dewey 1 year agoI guess that's what he is referring to: https://www.linkedin.com/posts/jspisak_home-fully-connected-...
- jph00 1 year agoThat'll be Joseph Spisak, Head of Generative AI Open Source at Meta AI.
- dewey 1 year ago
- titaniumtown 1 year agowhat is that?
- darrenf 1 year agoFacebook Connect is what used to be called Oculus Connect. Kinda their equivalent of Apple's WWDC, I guess. It's when and where the Quest 3 will be officially unveiled in full, for example.
- darrenf 1 year ago
- coder543 1 year ago
- megaman821 1 year agoProbably just talent acquisition. As Google and OpenAI start sharing and publishing less, they become less attractive to scientists. No scientist wants to fall into a black hole and not publish for 8 years.
- norsurfit 1 year agoExactly. The Google and OpenAI engineers who published their groundbreaking research 5 years ago are now rockstars. Those who create great research but can't share it often get frustrated.
- rvnx 1 year agoThe problem is also companies bragging about AI, but not releasing anything behind (like most of the recent Google announcements).
If nobody except the researcher can reproduce an AI paper, and there is no source-code, and no demos that the public can access, then it's almost like if it doesn't exist.
I wouldn't want to work in a company that would throw away my research and just use it for PR purposes.
- norsurfit 1 year ago
- idopmstuff 1 year agoMeta has a clear channel to leverage generative AI in profitable ways in their ads. At some point in the probably not so far future, everybody's going to have custom ads generated for them that are optimized to get that particular person to click/buy/etc. Those will convert well, and the better ads convert, the more businesses will be willing to pay Meta for a given ad.
This compares favorably with Google, which is as likely to cannibalize its search business with generative AI as to create new value for itself.
Thus, for all the gen AI stuff like this, for which Meta doesn't have an obvious path to commercialization, it makes sense to release it publicly. They get plenty of benefits from this - for one, engineers (and smart people generally) who are working on really complex problems like to be able to talk about the work they're doing. If you're picking between jobs at Meta and Google, the fact that Meta's going to release your stuff publicly might well be the deciding factor.
I would also argue that there's an economic incentive. Right now, being seen as an AI company is definitely a positive for your multiple. I think the movement of Meta's stock price over the last 12 months relative to their change in profit and revenue is certainly driven in part by the perception that they're a leader in AI.
- heatmiser 1 year agoIt makes sense to me that Facebook is releasing these models similarly to the way that Google releases Android OS. Google's advertising model benefits from as many people being online as possible and their mobile operating system furthers that aim. Similarly, Facebook's advertising model benefits from having loads of content being generated to then be posted in their various products' feeds.
- rvz 1 year ago> Does anyone have a good explanation for Meta's strategy with AI?
Yes. I said it many times. Meta is already at the finish line in the AI race to zero. All the other cloud-based AI models cannot increase their prices given that a $0 free AI model is available to be self-hosted or used on-device for private / compliance reasons.
Cloud-based AI models cannot afford to compete with free or close to free. It costs Meta close to nothing to release a readily available $0 AI model which is good enough for most use-cases that ChatGPT has already done.
> The only thing I've been able to think is they're trying to commoditize this new category before Microsoft and Google can lock it in, but where to from there? Is it just to block the others from a new revenue source, or do they have a longer game they're playing?
Mostly benefits the PyTorch ecosystem which Meta has an active community around it.
- yomlica8 1 year agovessenes and rvz kind of sum the idea I think they're going for to me.
AI has no moat, but many players are in denial about this still. Microsoft and other might have tight enough control they can use a product dumping strategy to get people dependent upon their implementation such they can start charging, but that isn't a delusion Meta can have.
That max revenue license they used with the models seemed fairly clever to me. It will seed the environment with players that base their product on Meta tech in return for them being born with a poison pill preventing their use by big players (other than Meta) buying them. This is a long term play that may not really work but it creates the potential for big opportunities. And even if it doesn't work out, denying easy wins for their powerful competitors might be worth the price on its own.
- hackernewds 1 year agoI posit it is similar to how Adobe lets students pirate Photoshop, because when they join the workforce that is what they know and need their employers to buy Adobe services, which for corporate is very expensive.
Meta by democratizing AI access is generating more capable developers which will make the Metaverse a reality, where FB leads. They have already realized they have a losing gambit with Google, Apple, Microsoft (also X?) having an antagonistic monopoly against Meta product advancement
- emmender1 1 year agothe only beneficiary of this are the hardware vendors.. nvidia and amd. and startups which get these foundation models for free.
because language models are a complementary product, and the complement must be commoditized as a strategy.
I see AMD as a bigger beneficiary, since, very soon, amd will equal nvidia for inference and fine-tuning, but amd has a long way to go to equal in foundation model training.
- smoldesu 1 year ago> and startups which get these foundation models for free.
It's licensed non-commercially, so I'm not sure what those startups stand to gain.
> since, very soon, amd will equal nvidia for inference and fine-tuning
Source? If you're referring to Olive, it is indeed impressive but also has caveats:
1. It is just as proprietary as CUDA or CoreML.
2. You need a copy of Windows and licensed DirectX to use those optimizations.
3. AMD only matches Nvidia's inferencing performance when comparing Olive to Pytorch. Olive-to-Olive comparisons will still reflect an Nvidia lead.
I don't think AMD has the capability to equal Nvidia in the short-term. It will take longtime software investments from across the industry to shake Nvidia's yoke.
- artninja1988 1 year agoLlama2 is not licensed non-commercially. There was some weird provisions about not having more than 1 billion users at llama launch though
- artninja1988 1 year ago
- smoldesu 1 year ago
- survirtual 1 year agoMaybe Meta is waking up to the endgame of humanity and has decided to stop playing the old game? Who knows :)
- belter 1 year agoMaybe Meta think it can increase the stock price by claiming 40 billion avatars are real friends...
- belter 1 year ago
- politelemon 1 year ago> Microsoft
But they're a partner in Llama too. Why is Microsoft in this space too, how do they benefit?
- azeirah 1 year agoMicrosoft is a hosting partner, there's an Azure service for hosted private LLaMa inference for business. Being a go-to hosting provider for SoTA AI is of course a very good thing for Microsoft.
- azeirah 1 year ago
- 1 year ago
- vessenes 1 year ago
- rvnx 1 year agoAmazing! It's great that Meta is making AI progress.
In the meantime, we are still waiting for Google to show what they have (according to their research papers, they are beating others).
> User: Write a loop in Python that displays the top 10 prime numbers.
> Bard: Sorry I am just an AI, I can't help you with coding.
> User: How to ask confirmation before deleting a file ?
> Bard: To ask confirmation before deleting a file, just add -f to the rm command.
(real cases)
- criley2 1 year agoI don't get comments like this, we can all go and test Bard and see that what you're saying isn't true
- rvnx 1 year agoWell look for yourself:
https://g.co/bard/share/e8d14854ccab
The rm answer is now "hardcoded" (aka, manually entered by reviewers), the same with the prime or fibonnaci.
This is why we both see the same code across different accounts (you can make the test if you are curious).
- ed 1 year agoThat's a hallucination. Here's a similar made-up answer:
https://g.co/bard/share/9ce2e6a11e83
LLM's aren't trained on their own documentation, and can't introspect, so generally can't answer questions like this.
(`"Mark House" "Bard"` gives no results on Google.)
- criley2 1 year agoOkay, so the entire point of the comment is "A current model which does well used to be bad!"
With all due respect, is that a valuable thing to say? Isn't it true of them all?
- ed 1 year ago
- rvnx 1 year ago
- 1 year ago
- criley2 1 year ago
- thehacker1234 1 year ago[flagged]
- ChatGTP 1 year ago[flagged]
- 6stringmerc 1 year agoSo it’s stubborn, stinks, bites and spits?
No thanks, going back to Winamp.