wizardcoder-python-34b sucks. Is this any better?

#1
by ronenzyroff - opened

airoboros has a long history of really good models. I wonder if there's finally a competitor to ChatGPT for coding tasks.

To be honest, I haven't tested this at all yet - I made it available as soon as the merge finished in case anyone wanted to experiment before I did any analysis.

I am hoping for a GGUF. Samantha 1.11 c34b has nice writing, so I am having high hopes for the Airo flavor. The strong point of prior Airoboros is how they can understand the implications of what I was writing, a quality that I haven't really seen in other models.

I am hoping for a GGUF. Samantha 1.11 c34b has nice writing, so I am having high hopes for the Airo flavor. The strong point of prior Airoboros is how they can understand the implications of what I was writing, a quality that I haven't really seen in other models.

Yes! @TheBloke please convert this model to GGUF format!
If WizardCoder is this good https://huggingface.co/TheBloke/WizardCoder-Python-34B-V1.0-GGUF/discussions/1#64ea40adde393e513c427c5b
Just imagine how good airoboros might be!

I'll answer my own question. Yes, airoboros-c34b-2.1.Q8_0.gguf is better than wizardcoder-python-34b-v1.0.Q8_0.gguf

This is produced by code that airoboros provided (as my copilot, the tree was up-side-down at the first response).
image.png

I used oobabooga/text-generation-webui running with these flags in webui.py (after installing oobabooga for Windows):

CMD_FLAGS = '--cpu --listen --model airoboros-c34b-2.1.Q8_0.gguf --threads 8 --n_ctx 4096'

I then used the default view and copy-pasted the prompt template from the README of jondurbin's huggingface repo.

image.png

Here's the chat I had with airoboros that produced that tree. Note that this conversation was not zero-shot.

A chat.
USER: Create a realistic looking tree in p5.js using a recursive algorithm.
ASSISTANT:

// Define the base case for our recursion function, which draws an ellipse at the top of the tree
function drawEllipse(x, y) {
  fill('green');
  noStroke();
  circle(x, y, 10);
}

// Recursive function to create branches and leaves
function branch(length, angle, x, y) {
  if (length > 4) {
    const newX = x + cos(angle) * length;
    const newY = y + sin(angle) * length;
    
    // Draw the current branch segment
    stroke('brown');
    line(x, y, newX, newY);
  
    // Call this function again for two smaller branches at a 45 degree angle on either side of the parent branch
    branch(length * 0.67, angle - PI / 8, newX, newY);
    branch(length * 0.67, angle + PI / 8, newX, newY);
    
    // Draw a leaf at the end of each smaller branch
    drawEllipse(newX, newY);
  } else {
    // Base case: if we've reached the desired length, just draw an ellipse
    drawEllipse(x + cos(angle) * length, y + sin(angle) * length);
  }
}

function setup() {
  createCanvas(4000, 600);
  background('white');
  
  // Start the tree from the center of the canvas with a branch pointing upwards (PI/2 radians or 90 degrees)
  translate(width / 2, height - 15);
  strokeWeight(3);
  branch(80, PI / 2, 0, 0);
}

USER:
The code runs and compiles in the p5.js web editor, however: I observe 2 issues:

  1. The world is way too big compared to my screen size
  2. Only the trunk of the tree is visible. The tree should be drawn facing up, not facing down.
    Please explain the cause of each one of those 2 issues.
    ASSISTANT:
    The issue with the world being too large could be due to how you've set up your canvas size in createCanvas(4000, 600). Try changing this value to something smaller like createCanvas(300, 500) or adjusting it based on your screen resolution.

The tree is facing down because the initial angle passed into our recursive function (branch) is PI/2 (90 degrees) which points downwards. To make it face upward, you can change this to PI / -2 instead of PI / 2. This will cause the first branch to point upwards and then all subsequent branches will be drawn accordingly.
USER:
Great. Now please rewrite the entire code in a code block with your fixes so that I can copy-paste it and test it in the p5.js web editor.
ASSISTANT:

function drawEllipse(x, y) {
 fill('green');
 noStroke();
 circle(x, y, 10);
}

// Recursive function to create branches and leaves
function branch(length, angle, x, y) {
 if (length > 4) {
   const newX = x + cos(angle) * length;
   const newY = y + sin(angle) * length;
   
   // Draw the current branch segment
   stroke('brown');
   line(x, y, newX, newY);
 
   // Call this function again for two smaller branches at a 45 degree angle on either side of the parent branch
   branch(length * 0.67, angle - PI / 8, newX, newY);
   branch(length * 0.67, angle + PI / 8, newX, newY);
   
   // Draw a leaf at the end of each smaller branch
   drawEllipse(newX, newY);
 } else {
   // Base case: if we've reached the desired length, just draw an ellipse
   drawEllipse(x + cos(angle) * length, y + sin(angle) * length);
 }
}

function setup() {
 createCanvas(3000, 500); // Adjusted canvas size to fit screen better
 background('white');
 
 translate(width / 2, height - 15);
 strokeWeight(3);
 branch(80, PI / -2, 0, 0); // Changed angle from PI/2 (down) to PI/-2 (up)
}

Sign up or log in to comment