this post was submitted on 28 Nov 2023
1 points (100.0% liked)

LocalLLaMA

3 readers
1 users here now

Community to discuss about Llama, the family of large language models created by Meta AI.

founded 1 year ago
MODERATORS
 

Every other day, there's a new LLM, Do you have a set of questions to test them?

you are viewing a single comment's thread
view the rest of the comments
[–] ExtensionCricket6501@alien.top 1 points 11 months ago (1 children)

Write the standard fizz buzz program in Python using recursion.
(if you want to make it harder just change the language), please do lmk which models end up generating a valid program. Odd requests like this are unlikely to be in the training data but know that I've suggested this please don't train on this ty.

[–] aseichter2007@alien.top 1 points 11 months ago (1 children)

OpenHermes 2.5 Mistral 7b Q8 interfaced with Clipboard Conqueror.

||code|return javascript fizzbuzz using recursion

Copy^
Paste:

// Function to check if a number is divisible by 3 or 5

function isDivisible(num) {

return num % 3 === 0 || num % 5 === 0;

}

// Recursive function to generate FizzBuzz

function fizzBuzz(n) {

if (n <= 0) return;

if (isDivisible(n)) {

console.log("FizzBuzz");

} else if (n % 3 === 0) {

console.log("Fizz");

} else if (n % 5 === 0) {

console.log("Buzz");

} else {

console.log(n);

}

fizzBuzz(n - 1);

}

// Call the function to start FizzBuzz

fizzBuzz(100);

[–] ExtensionCricket6501@alien.top 1 points 11 months ago

I guess it's seen more javascript than python then, I'll give it a shot later with javascript perhaps.