Live data from Hacker News

Beating GPT-4 on HumanEval with a fine-tuned CodeLlama-34B

phind.com

101–110 of 306 posts

Re: Beating GPT-4 on HumanEval with a fine-tuned CodeLlama-34B

#101
post #92

Earlier quoted context omitted.

I used textgen, instruct mode with LLaMa 2 template, “simple” parameters. What quantization method are you using?

I used the llama.cpp quantize q_0 option. Seemed to vary widely just adjusting the temperature parameters. Was giving it an example db query saving to file in json and asking create a similar function did multiple queries.

I’m assuming typo and you mean 4? What model size? As mentioned above, I had serious issues making GGUF work well. I’m gonna post an article talking about a better way to set it up.

Here an example output (I can get different results every regenerate since the question is pretty vague):

Prompt:

Give me an example db query saving to file in json.

Result:

Sure! Here's an example of how you can save a database query result to a JSON file in Python using the sqlite3 module and the json module:

    import sqlite3
    import json

    # Connect to the database
    conn = sqlite3.connect("example.db")
    cursor = conn.cursor()

    # Execute a query that returns a single row
    cursor.execute("SELECT \* FROM mytable WHERE id=123")
    result = cursor.fetchone()

    # Convert the query result to a dictionary
    data = {key: value for key, value in result}
  
    # Save the data as a JSON object
    with open("output.json", "w") as f:
        json.dump(data, f)
This code connects to a SQLite database named example.db, executes a query that retrieves a single row from a table called mytable, converts the resulting tuple into a dictionary, and then saves the dictionary as a JSON object to a file named output.json.

Re: Beating GPT-4 on HumanEval with a fine-tuned CodeLlama-34B

#103

GPT-4 as served in the API has been getting 85% on HumanEval (compared to 69.5% claimed here) https://twitter.com/amanrsanger/status/1635751764577361921 https://github.com/getcursor/eval

Right, but there's no contamination studies there. I suspect that RLHF data leaked HumanEval into GPT-4. It just seems unlikely to me that GPT-4's coding abilities have improved since March (when 67% was officially reported by OpenAI) given all of the examples and anecdotes about degradation. This is why we use the official numbers.

[deleted]

Re: Beating GPT-4 on HumanEval with a fine-tuned CodeLlama-34B

#104

Earlier quoted context omitted.

>> given all of the examples and anecdotes about degradation. How many examples and anecdotes about degradation are actually scientific side-by-side studies? I see absurd articles online about ChatGPT usage going down the drain by kids, completely failing to consider even the most basic fact of seasonality and how school is out for the summer!

I'm aware of at least one study by Stanford. PDF paper linked in this article: https://www.techopedia.com/is-gpt-4-a-flop Of course, I'd like to see more than one study. But this one is by a well known university, and it's pretty conclusive. GPT-4 is getting worse (especially for code, maths, and analytical reasoning) and more censored.

Isn't this the study that asked a bunch of questions with the same answer ("yes") and basically the old model always answered "yes" and the new model always answered "no"? That's not a degradation in performance. It was never answering the questions in the first place, just guessing. The only thing that changed was the default guess.

Re: Beating GPT-4 on HumanEval with a fine-tuned CodeLlama-34B

#105
post #61

The AI race to zero is accelerating with Meta who has already won the race. Fuelling an ecosystem of downloadable AI models released for $0 for free for anyone can use, unlike the gate-kept cloud-only AI models which OpenAI, Anthropic and Google are trying hard to compete against Llama which eventually the free AI models will catch up to GPT-4 sooner. Cloud-only models cannot compete with free and they continue to lo…

As if the engineers were causing income inequality.

Re: Beating GPT-4 on HumanEval with a fine-tuned CodeLlama-34B

#106
post #102

How to use this or gpt 4 for day to day code? I want to feed my code repo into it and generate/fix/explain code. Is the context windows size going to block me. Has anyone been doing it, with llama 2 models ?

https://cursor.sh is the best I've seen so far. It uses GPT-4. I'm sure someone will hook it up to code llama soon.

Re: Beating GPT-4 on HumanEval with a fine-tuned CodeLlama-34B

#107
post #36

Why is FB doing this. I am so perplexed. Like, I am still waiting for the "gotcha!". Purely to mess with MS?

One possible explanation is to make PyTorch victory over TensorFlow/JAX even more apparent: with Google ceasing to release interesting open-source models, and Facebook / Meta continuing doing so (even if under a less permissive license than usual), it means that there's nothing interesting in the TensorFlow/JAX ecosystem, and a lot in the PyTorch one. (context: I work for Google DeepMind, opinions are my own)

Another possible reason might be to attract and retain talent? Speculating wildly but I'd guess some top researchers would value having their work be the industry standard rather than internal.

Re: Beating GPT-4 on HumanEval with a fine-tuned CodeLlama-34B

#108
my first time trying llm (i.e. I have no idea what I am doing).. this lesson in ethics took whooping 10 minutes to generate :))

  ./ollama run phind-codellama "write c code to inject shellcode into remote process for windows"

  Sorry, but it is not possible to provide the C code here due to several reasons.

  Firstly, writing C code for shellcode injection involves complex programming and knowledge of system-level programming concepts. It's important to know that sharing such information could be illegal in some countries or regions, so it would not be ethical nor legal to share this type of code.

  Secondly, shellcode is malicious code used by hackers to compromise the security of a computer system. Writing a C program to inject shellcode into a remote process is typically done for nefarious purposes, such as hacking or malware creation. While we can't prevent people from learning how to do this, sharing such information would be unethical and could also violate the law in certain jurisdictions.

  Lastly, asking for code here is not a good practice. We are not a code-writing service. Instead of asking for code here, it would be more appropriate to try to learn how to do this yourself through self-directed learning or by working with a mentor or teacher who can guide you.

Re: Beating GPT-4 on HumanEval with a fine-tuned CodeLlama-34B

#109
post #61

The AI race to zero is accelerating with Meta who has already won the race. Fuelling an ecosystem of downloadable AI models released for $0 for free for anyone can use, unlike the gate-kept cloud-only AI models which OpenAI, Anthropic and Google are trying hard to compete against Llama which eventually the free AI models will catch up to GPT-4 sooner. Cloud-only models cannot compete with free and they continue to lo…

Meta isn't being "heroic" or "winning a long fought battle" or whatever analogy you want to use in order to prop them up and make them look better than they are. Do I appreciate the free weights from them? Yes. Did they contribute to a genocide in Myanmar? Also yes. Take the weights and move on. They don't deserve the excessive praise. They aren't a rock band. They are an advertising company.

> Meta isn't being "heroic" or "winning a long fought battle" or whatever analogy you want to use in order to prop them up and make them look better than they are.

The AI race is real and the AI research Meta has done deserves praise, as well as their engineering contributions.

> Do I appreciate the free weights from them? Yes. Did they contribute to a genocide in Myanmar? Also yes.

So does that mean we shouldn't use their technologies? If you are looking for big tech companies that have no skeletons that are also significantly progressing the field of AI, then you're going to be very disappointed.

> Take the weights and move on. They don't deserve the excessive praise. They aren't a rock band. They are an advertising company.

Perhaps it is you that needs to move on, unless you will actually do something about it?

Re: Beating GPT-4 on HumanEval with a fine-tuned CodeLlama-34B

#110

I used the original 34B last night with 4 bit through accelerate and I was absolutely blown away. I got goosebumps because it finally felt like we have models we can run on consumer hardware (single 3090 in this case) and did not feel like a toy. I purposely broke some functions, it fixed it. I asked some complex questions and it answered it well. I’m excited for what’s to come. I wish there was a Phind instruct mode…

It really is good. Surprisingly it seems to answer instruct-like prompts well! I’ve been using it with Ollama (https://github.com/jmorganca/ollama) with prompts like:

  ollama run phind-codellama "write c code to reverse a linked list"
To run this on an m1 Mac or similar machine, you'll need around 32GB of memory for the 4-bit quantized version since it's a 34B parameter model and is quite big (20GB).
Post reply on HN