Alvaro Cintas Profile picture
Aug 26, 2023 12 tweets 7 min read Read on X
Everyone is talking about Code Llama.

A large language model fine-tuned for coding tasks.

So I had to put it to the test against ChatGPT!

Here are my findings [THREAD]: Image
✍️ Before we start:

- This is by no means a conclusive/thorough study. This was done for fun testing different LeetCode coding questions (you can try on your own to practice!) just to see how they would do.

- I’ll be using ChatGPT with GPT-3.5 and Code Llama Instruct - 34B through Perplexity.

- Most of the time Perplexity was printing the code with no indentations, I added the indentations manually.

- They might do okay if you ask them a second time or express the question differently. However, I just wanted to test them in a single prompt with no variations.
QUESTION 1

“Use Python. You are given two strings word1 and word2. Merge the strings by adding letters in alternating order, starting with word1. If a string is longer than the other, append the additional letters onto the end of the merged string.

Return the merged string.

Example 1:

• Input: word1 = "abc", word2 = "pqr"
• Output: "apbqcr"

🟢 ChatGPT: +1
🔵 Code Llama: +1
QUESTION 2

“Use Python. Given a string s, reverse only all the vowels in the string and return it.

The vowels are 'a', 'e', 'i', 'o', and 'u', and they can appear in both lower and upper cases, more than once.

Example 1:

Input: s = "hello"
Output: "holle"

🟢 ChatGPT: +1
🔵 Code Llama: 0
QUESTION 3

“Use Python. Given an integer array nums, move all 0's to the end of it while maintaining the relative order of the non-zero elements.

Note that you must do this in-place without making a copy of the array.

Example 1:

Input: nums = [0,1,0,3,12]
Output: [1,3,12,0,0]”

🟢 ChatGPT: +1
🔵 Code Llama: 0
QUESTION 4

“Use Python. You have a long flowerbed in which some of the plots are planted, and some are not. However, flowers cannot be planted in adjacent plots.

Given an integer array flowerbed containing 0's and 1's, where 0 means empty and 1 means not empty, and an integer n, return true if n new flowers can be planted in the flowerbed without violating the no-adjacent-flowers rule and false otherwise.

Example 1:

Input: flowerbed = [1,0,0,0,1], n = 1
Output: true

Example 2:

Input: flowerbed = [1,0,0,0,1], n = 2
Output: false”

🟢 ChatGPT: +1
🔵 Code Llama: +1
QUESTION 5

“Use Python. Given an input string s, reverse the order of the words.

A word is defined as a sequence of non-space characters. The words in s will be separated by at least one space.

Return a string of the words in reverse order concatenated by a single space.

Note that s may contain leading or trailing spaces or multiple spaces between two words. The returned string should only have a single space separating the words. Do not include any extra spaces.

Example 1:

Input: s = "the sky is blue"
Output: "blue is sky the"”

🟢 ChatGPT: +1
🔵 Code Llama: +1
QUESTION 6

“Use Python. Given a string s and an integer k, return the maximum number of vowel letters in any substring of s with length k.

Vowel letters in English are 'a', 'e', 'i', 'o', and 'u'.

Example 1:

Input: s = "leetcode", k = 3
Output: 2
Explanation: "lee", "eet" and "ode" contain 2 vowels.”

🟢 ChatGPT: +1
🔵 Code Llama: +1
QUESTION 7

“Use Python. You are given a string s, which contains stars *.

In one operation, you can:

Choose a star in s.
Remove the closest non-star character to its left, as well as remove the star itself.
Return the string after all stars have been removed.

Example 1:

Input: s = "leet**cod*e"
Output: "lecoe"”

🟢 ChatGPT: +1
🔵 Code Llama: 0
QUESTION 8

“Use Python. Given an array of integers temperatures represents the daily temperatures, return an array answer such that answer[i] is the number of days you have to wait after the ith day to get a warmer temperature. If there is no future day for which this is possible, keep answer[i] == 0 instead.

Example 1:

Input: temperatures = [73,74,75,71,69,72,76,73]
Output: [1,1,4,2,1,1,0,0]”

🟢 ChatGPT: +1
🔵 Code Llama: +1
RESULTS

🟢 ChatGPT: 8/8
🔵 CodeLlama: 5/8

Notes:

The questions where selected at random. I usually pick questions that are short and easy to understand.

Have you tried Code Llama? How is your experience compared with ChatGPT? 👇
If you enjoyed it, it would be great if you could like & retweet the first tweet :)

Also, you can subscribe for free to , where I share AI tutorials, news, and tools. todaystechtalk.beehiiv.com

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Alvaro Cintas

Alvaro Cintas Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @dr_cintas

Sep 14
What a crazy week in AI 🤯

- Replit Agent 3
- Seedream 4.0 Image
- K2-Think AI Reasoning
- ElevenLabs Voice Remixing
- Ernie X.1.1 Reasoning Model
- First AI Government Minister
- Anthropic Create & Edit Files
- Apple AI Real-Time Translation

Here’s EVERYTHING you need to know:
1. Replit launches Agent 3, running autonomously for up to 200 minutes while building, testing, and fixing apps.

The AI agent creates other agents and automations, transforming from a helpful assistant into a true coding collaborator.
2. ByteDance unveils Seedream 4.0, unifying image generation and editing in one architecture with 4K output.

The model beats Google's Nano Banana on benchmarks while generating 2K images in just 1.8 seconds. Image
Image
Read 11 tweets
Sep 13
The first AI design agent with Nano Banana has dropped.

It combines major models for image, video, and 3D asset generation all in one place.

You can also edit the images, generate music, and even voiceovers!

Step-by-step tutorial 👇
The Design Agent is called @Lovart_ai and you can access it here:

Once there, create a new project and either use the chat to generate an initial image or upload the images you want the agent to use. lovart.ai
Select the image you want to edit.
This will prompt a chat where you can ask things like making a 3D figurine.
Read 8 tweets
Sep 12
You can now clone any website just by writing a prompt.

Just paste the website URL and Al agents will instantly create a working clone you can build on top of.

100% open source with major AI models👇
Here is the source code:

Work beautifully done by the @firecrawl_dev team!

To use it, follow these steps: github.com/firecrawl/open…Image
1. Clone & Install

Type these commands in your terminal: Image
Read 6 tweets
Sep 11
I found a way to build internal AI tools in minutes.

Any team can ship custom AI agents that actually work with no code.

It's incredibly simple and deploys anywhere.

Here's how I build one with StackAI👇:
1/ Create the workflow with chat
Just type your idea → get a complete agent workflow.

Example: “Build a policy Q&A that answers from our docs with citations, logs every answer, and flags PII.”

It builds and explains the workflow for you in seconds.
2/ RAG + Agent logic

• Plug in your sources (PDFs, SharePoint, URLs) as a Knowledge Base
• Configure how the AI retrieves, reasons, and responds

From a simple RAG → to a full agent in a few clicks.
Read 7 tweets
Sep 7
What a crazy week in AI 🤯

- Krea AI Real Time Video
- Ideogram Styles Presets
- ChatGPT Branch Feature
- Grok Imagine with Speech
- Google’s EmbeddedGemma
- Kimi K2 1T Parameter Model
- Alibaba Qwen3-Max-Preview
- Warp Code Top Coding Agent

Here’s EVERYTHING you need to know:
1. Krea AI debuts real-time video generation at 12+ fps, letting users create and edit videos instantly as they type.

The platform generates frame-consistent clips with full temporal stability, revolutionizing creative workflows with instant feedback.
2. Ideogram launches Styles Presets, offering creative control through reference images.

Users can now upload up to 3 style references while the Random Style feature provides access to thousands of unique aesthetic combinations.
Read 11 tweets
Sep 3
This is Claude Code on steroids.

Warp Code just launched, the biggest upgrade yet to the world’s #1 coding agent. Here’s what you can do now.

(Free AI credits at the end 👇)
1. Warp just landed #3 on SWE-bench Verified and ranks #1 on Terminal-Bench (52%). Image
2. What’s new:

• Review Agent’s Code
• Code Editing: A lightweight, built-in editor with tabs, file tree, syntax highlighting, & vim bindings.
• Projects & Profiles: Initialize projects with rules, WARP .md files, and agent profiles so each agent behaves exactly how you need
Read 8 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(