Live data from Hacker News

Code Llama, a state-of-the-art large language model for coding

ai.meta.com

411–420 of 525 posts

Re: Code Llama, a state-of-the-art large language model for coding

#412

Works 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): # prints the first ten prime numbers def print_primes(): i = 2 num_printed = 0 # end of prompt while num_printed It will be interesting to see how the larger models perform, especially afte…

I'd fail an interview candidate that suggested adding 1 each time for subsequent prime testing

So I take it you typically produce fully optimized, thoughtful, and correct code on the first iteration while being actively judged by a stranger, yes?

Re: Code Llama, a state-of-the-art large language model for coding

#413

Earlier quoted context omitted.

> "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 propert…

How many even numbers are prime?

One.

Re: Code Llama, a state-of-the-art large language model for coding

#416
post #11

Even 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...

I'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-...

Copilot 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.

Re: Code Llama, a state-of-the-art large language model for coding

#417

Works 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): # prints the first ten prime numbers def print_primes(): i = 2 num_printed = 0 # end of prompt while num_printed It will be interesting to see how the larger models perform, especially afte…

For 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!

Re: Code Llama, a state-of-the-art large language model for coding

#418

Earlier quoted context omitted.

Yeah, 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.

Someone 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.

We then train the LLM on all code optimized like this.

Re: Code Llama, a state-of-the-art large language model for coding

#419

Earlier quoted context omitted.

Having "extremely basic understanding" of prime numbers immediately at one's command is important for approximately 0% of software engineering jobs. If you instant-fail a candidate for this, it says a lot more about you and your organization than the candidate.

Approx 0% of devs need to know what the earth is, but from lots of interviews I've given I've found consistent correlation between lack of basic knowledge and lack of ability to solve many things. It was so strong we found it much more cost effective to cut people early that didn't know at least a few of some standard knowledge items.

This is some really good advice here. It's always a good idea to throw out all candidates that can't immediately recall what the first theoretical result of the rest mass of a Higgs boson was in the first paper describing was. Basic knowledge like this just correlates so well with ability to make proper decisions in API architecture.

Re: Code Llama, a state-of-the-art large language model for coding

#420

Anyone 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.

https://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.
Post reply on HN