Earlier quoted context omitted.
I'd fail an interview candidate that suggested adding 1 each time for subsequent prime testing
i’d walk out from an interview that asked me to write a prime number generator
Code Llama, a state-of-the-art large language model for coding
361–370 of 525 posts
Re: Code Llama, a state-of-the-art large language model for coding
#362Earlier 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.
> If you instant-fail a candidate for this, it says a lot more about you and your organization than the candidate. yes, we expect professional software developers to have basic maths skills "what is a prime number" is taught to 7 year olds, it's not vector calculus what else would you consider to be an unreasonable thing for an employer to require? reading and writing skills of a typical 7 year old?
Re: Code Llama, a state-of-the-art large language model for coding
#363Works 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
Re: Code Llama, a state-of-the-art large language model for coding
#364Works 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
Re: Code Llama, a state-of-the-art large language model for coding
#365Earlier quoted context omitted.
I'm mad at myself now that it has eaten 15 minutes of my time trying to come up with the right optimization. What's the trick? 2, +1, and then +2 from there on seems obvious but once you get to 9 is it worth building a list of nonprimes to skip?
https://stackoverflow.com/a/54544012/1336678 Common approach is to use square roots, this reduces the runtime. Recommend checking out project euler if you like solving hard math-code-o(n)-puzzles.
Yes it makes sense (in the GPT code) that you'd only go up to i * i ... although looking at pythonic while: statements is just gross to me in this context, it would feel a lot more readable to say, e.g. in PHP:
for ($i=2;$i<sqrt($n);) { $i+=($i==2 ? 1 : 2); //although the first one should just be outside the loop }
Re: Code Llama, a state-of-the-art large language model for coding
#366Earlier quoted context omitted.
> If you instant-fail a candidate for this, it says a lot more about you and your organization than the candidate. yes, we expect professional software developers to have basic maths skills "what is a prime number" is taught to 7 year olds, it's not vector calculus what else would you consider to be an unreasonable thing for an employer to require? reading and writing skills of a typical 7 year old?
I think the key problem here is that is is a bad programming question. If you know anything about prime numbers then coming up with an answer is trivial. If you expect a more optimized solution, then you are really only gauging the interviewee’s understanding of prime numbers. So effectively the interview is more about mathematics than it is about programming or problem solving.
Re: Code Llama, a state-of-the-art large language model for coding
#367Re: Code Llama, a state-of-the-art large language model for coding
#368Earlier quoted context omitted.
Agreed. 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 essenti…
I'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
Re: Code Llama, a state-of-the-art large language model for coding
#369Works 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…
Simple, concise, more efficient: def primes_upto(limit: int): """Generate prime numbers 2 3 5 7 11 13 17 19 23 29
Re: Code Llama, a state-of-the-art large language model for coding
#370Business 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…
Did you try Oobabooga ( https://github.com/oobabooga/text-generation-webui ) yet?
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.