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

Jul 1
This is the Cursor moment for design.

It’s called MagicPath and it’s an infinite canvas where you literally chat your way to production-ready designs.

Figma completely redesigned.

5 wild examples + how to try free 👇:
2. Streaming app
3. Trailrunner app
Read 7 tweets
Jun 27
What a crazy week in AI 🤯

- Google Gemini CLI
- HeyGen new Agent
- Higgsfield Soul Model
- DeepMind AlphaGenome
- Anthropic Upgrade Artifacts
- ElevenLabs 11a Voice Assistant
- Flux.1 Kontext Dev Open-Sources
- Google’s On-Device AI Gemma 3n

Here’s EVERYTHING you need to know:
1. Google releases Gemini CLI, bringing AI power directly to your terminal.

The open-source tool offers free Gemini 2.5 Pro access with 1 million token context for code debugging and file manipulation.
2. HeyGen announces Video Agent, the world’s first “Creative Operating System.”

Just give it a prompt and it builds the story, generates voice, handles editing, and delivers publish-ready videos.
Read 10 tweets
Jun 24
This is Claude Code and OpenAI Codex on steroids.

Warp 2.0 just dropped and here’s what it can do.

(Free AI credits at the end 👇)
Warp is like if Cursor, Claude Code, and Codex were all together at one place.

It combines AI and your dev team’s knowledge in one fast, intuitive coding platform.
It can use either:

- Its agent: to code, modify files, and write docs
- The terminal: where you can simply describe what you want and will complete it

Plus, it supports all major AI models, unlike Claude Code.
Read 6 tweets
Jun 23
🚨 Top AI Video model has been released.

Seedance 1.0 by Dreamina AI has ranked #1 in both text-to-video and image-to-video, beating Veo 3 and Sora.

They also upgraded Image3.0 with Smart Image Prompt Reference.

Examples & link to try free below.
This is the link to access @dreamina_ai:

You can experience Video3.0 (Seedance 1.0 mini version)  and Image3.0 on the website right now.

And the Seedance 1.0 full version is coming soon.

With just one sentence, I got surprising results, cases below👇 dreamina.capcut.com/ai-tool/home/?…
Here are some video examples:

1. “A man prepares breakfast in a cozy kitchen, flipping pancakes with a smile”

We got natural motion & human expression feel spot on.
Read 8 tweets
Jun 20
What a crazy week in AI 🤯

- Midjourney V1 Video
- ChatGPT Record Mode
- Higgsfield new AI Canvas
- Claude Code MCP Servers
- Google Search Live AI Mode
- MIT Study ChatGPT’s Impact
- MiniMax M1 model & AI Agent
- Tencent open-source 3D model

Here’s EVERYTHING you need to know:
1. Midjourney enters the video game with their first AI video model V1 that turns any image into 5-second clips.

Users can also extend videos up to 20s and it's available on their $10/month plan starting now.
2. OpenAI launches Record Mode, a new meeting assistant that records, transcribes, and summarizes your conversations.

Available on ChatGPT Pro, Team, Enterprise and Edu for Mac users.

Other updates include: OpenAI podcast, Image Generation on WhatsApp, and Canvas Downloads. Image
Read 10 tweets
Jun 18
🚨MiniMax open-sources the world’s longest context window reasoning AI model.

It’s called MiniMax M1 and supports 1M token inputs / 80k outputs, letting you analyze huge documents and follow deep reasoning without context loss.

Powerful use cases + link to try free below:
Key features from paper:

- World’s Longest Context Window (1M token input and 80k outputs)
- SOTA Agentic Use among Open-Source Models
- $534,700 RL training in 3 weeks

Access @MiniMax__AI report: github.com/MiniMax-AI/Min…
I tested it out, quite impressed:

- Feels fast, even for huge inputs
- Solid at step-by-step reasoning & tool-using style tasks
- Strong at coding and simulation tasks 

To try it, two options:

In MiniMax Chat: chat.minimax.io 
In MiniMax Agent:agent.minimax.io Image
Image
Read 7 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!

:(