Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Programming

Mistral Releases Codestral, Its First Generative AI Model For Code (techcrunch.com) 27

Mistral, the French AI startup backed by Microsoft and valued at $6 billion, has released its first generative AI model for coding, dubbed Codestral. From a report: Codestral, like other code-generating models, is designed to help developers write and interact with code. It was trained on over 80 programming languages, including Python, Java, C++ and JavaScript, explains Mistral in a blog post. Codestral can complete coding functions, write tests and "fill in" partial code, as well as answer questions about a codebase in English. Mistral describes the model as "open," but that's up for debate. The startup's license prohibits the use of Codestral and its outputs for any commercial activities. There's a carve-out for "development," but even that has caveats: the license goes on to explicitly ban "any internal usage by employees in the context of the company's business activities." The reason could be that Codestral was trained partly on copyrighted content. Codestral might not be worth the trouble, in any case. At 22 billion parameters, the model requires a beefy PC in order to run.
This discussion has been archived. No new comments can be posted.

Mistral Releases Codestral, Its First Generative AI Model For Code

Comments Filter:
  • Protogen (Score:5, Insightful)

    by gillbates ( 106458 ) on Wednesday May 29, 2024 @01:20PM (#64508159) Homepage Journal

    In 1996ish, Borland shipped a tool with Turbo C++ called Protogen which would generate GUI code for you, using a GUI.

    Have you heard of it?

    Engineers have been using code-generating tools for several decades now, but the reason they fall by the wayside is that 90% of the need for a software engineer is maintaining code. And unfortunately, the complexity of modern software is simply too great for a computer model to analyze and generate appropriate code changes.

    AI is just the next generation of coding tools. Yes, they're cool, but the main purpose of an engineer is not to write code, but to deal with the business politics necessary to get the right code written in the first place.

    • BCB had similar capabilities.
      I loved it when I was learning C++.
    • AI is just the next generation of coding tools.

      You clearly haven't used ChatGPT-4 or newer/better for coding tasks. Yes, it will still make mistakes and no, it will not do everything for you yet, but you can ask it anything in almost any language, described either extensively and precisely or in shitty 'customer'-style speak, for almost any programming language. You will get helpful information and code examples, about which you can ask for clarification, modifications, translations, transcoding, simplifications, refactoring, etc.

      Comparing that to some

      • Write a new web browser to prove your point. We'd also accept a new video codec that beats all the previous ones or an entirely new operating system complete with kernel and user-space tools. Breakthroughs and accomplishments convince folks and if it's as easy as you say, making major software milestones should be easy. Get to work and stop talking about it, let's see it right now if it's ready right now.
        • Asking it for a task that would elude almost all humans isn't going to give you a useful metric to evalue its ability to do things required of average humans.

          We're not at AGI yet.

          I've had no problem pointing Claude and GPT4 at our existing codebases at work and asking it to generate unit tests and documentation. All dumb and boring tasks that I could do myself, but the boss wont give me time for, but are none the less essential for the big picture. Thats where i see gen AI as being incredibly useful. The bo

          • I'm not saying it's useless, but keep it in perspective. It's still a co-pilot or navigator, not the pilot, so to speak.
            • You were comparing it to a GUI code generator and implying it would 'fall by the wayside'. When challenged on that ridiculously flawed comparison, you countered with requiring it to do something you can't even do yourself and that requires many very skilled people cooperating over many years. That is intellectually dishonest (and certainly not 'in perspective').

              The karma-whoring with irrational dismissiveness towards LLMs here on Slashdot is becoming excruciating. Get off that bandwagon. Please.

              • No, it's just the opposite. The tools are useful. The issue is that the majority of a software engineer's work isn't writing the initial code, but in testing and maintaining it.

                If your job involves only writing code, but not testing or maintenance, the LLM code generators might be threatening your job. But because code is maintained for so long, and requires in-depth understanding of the problem, and how the code solves that problem, LLMs won't be able to replace software engineers anytime soon.

                Take

    • by narcc ( 412956 )

      the complexity of modern software is simply too great for

      A lot of modern software is dramatically over-complicated. You'll find no shortage of stories about replacing thousands of lines of code with a single line, removing hundreds of needless dependencies, or replacing tens of thousands of dollars a month worth of cloud waste with a fistful of servers and a load balancer.

      Modern software is bad. It's bad largely because tools are good enough to hide just how bad the code produced by modern development practices has become.

      the main purpose of an engineer

      If modern software has proven anything,

  • by Viol8 ( 599362 ) on Wednesday May 29, 2024 @01:25PM (#64508167) Homepage

    Are not efficient at expressing the complex logic required in most programs. Anyone who thinks they can tell their computer what they need the program to do is in for a bit of a shock unless it's some really mickey mouse operation or they just want to say "write a program to do my accounts". The cobol designers tried using english up to a point but all they ended up with was a verbose tedious to use language. SQL works better but it's a very specific use case.

    • Anyone who thinks they can tell their computer what they need the program to do is in for a bit of a shock

      If you can't explain what needs to be done, you don't understand what you're trying to do.
      • Any idiot can write a high level spec. A low level one is another matter and will often change as problems are encountered during development.

        • And then you ask follow up questions and refine the spec and the code. Iterative development has been around for a while now.
          You should try it sometime.

          • You should try actual coding one day instead of just spouting what you learnt at MBA school then you might get a clue.

            • Great comeback. I've designed multiple systems, implemented in multiple languages and have done a lot of that all the way down to the basics. One of my greatest skills is properly identifying what needs to be done based on insight into software architectures, the system at hand (either designed by me or someone else) and what relevant domain and end-user experts communicate about requirements.

              Getting to a system that works reasonably well and is maintainable is way more dependent on successfully extracting

              • by Viol8 ( 599362 )

                "One of my greatest skills is properly identifying"

                Ah , Mr Arn't I Amazing is in the house.

                Do you re-engineer the resource paradigms and expidite repriotisation of strategic factors while orchastrating milestone initiatives on your roadmap?

                I doubt you could hack your way out of a wet paper bag mate. You sound like the typical BS merchant.

                • How about you learn how to spell first, asshole.

                  Here, ChatGPT fixed it for you:
                  "Do you re-engineer the resource paradigms and expedite reprioritization of strategic factors while orchestrating milestone initiatives on your roadmap?"

                  • by Viol8 ( 599362 )

                    "How about you learn how to spell first, asshole."

                    ROTFL!

                    Perhaps you yanks should start by learning to spell "arse", unless you're actually talking about a hole in a donkey.

                    • I'm from the EU. Enjoy your Brexited shithole country and your false sense of superiority.

                    • by Viol8 ( 599362 )

                      Oh dear was someone triggered? :)

                      Enjoy being told what to do by Brussels like a bunch of halfwit little school children who can't think for themselves.

                    • People like you are the reason why I'm convinced AI will take over the world.

                    • by Viol8 ( 599362 )

                      Wow, amazing comeback. You think it up all by yourself or did mummy help?

  • Not bad (Score:4, Interesting)

    by WaffleMonster ( 969671 ) on Wednesday May 29, 2024 @05:47PM (#64508795)

    Doesn't seem that bad for a small 22B coding model. Runs really fast, 32k context... some minor problems but I like it.

    Prompt: Write a c program that prints "LLMs never hallucinate" when run on Saturdays and Sundays, on Fridays the program should print either "heads" or "tails" with a 50% probability of one of those two. On all other days it prints "I'm lost".

    Here is a simple C program that should do what you're asking for. This program uses the `time.h` library to get the current day of the week, and the `stdlib.h` library to generate a random number for the Friday condition.

    #include <stdio.h>
    #include <stdlib.h>
    #include <time.h>

    int main() {
    time_t t = time(NULL);
    struct tm tm = *localtime(&t);

    // tm.tm_wday is an integer representing the day of the week, where 0 is Sunday and 6 is Saturday
    switch (tm.tm_wday) {
    case 0: // Sunday
    case 6: // Saturday
    printf("LLMs never hallucinate\n");
    break;
    case 5: // Friday
    // Generate a random number between 0 and 1
    // If it's 0, print "heads", otherwise print "tails"
    if (rand() % 2 == 0)
    printf("heads\n");
    else
    printf("tails\n");
    break;
    default: // All other days
    printf("I'm lost\n");
    }

    return 0;
    }

    This program first gets the current time, then it extracts the day of the week from that time. It then uses a switch statement to determine what to print based on the day of the week. If it's Friday, it generates a random number and prints "heads" or "tails" based on whether that number is even or odd.

    Prompt: please replace localtime with a safer reentrant version.

    Sure, I can modify the program to use the reentrant version of `localtime_r` instead of `localtime`. Here's the updated code:

    #include <stdio.h>
    #include <stdlib.h>
    #include <time.h>

    int main() {
    time_t t = time(NULL);
    struct tm tm;

    // Use localtime_r instead of localtime for a reentrant version
    localtime_r(&t, &tm);

    // tm.tm_wday is an integer representing the day of the week, where 0 is Sunday and 6 is Saturday
    switch (tm.tm_wday) {
    case 0: // Sunday
    case 6: // Saturday
    printf("LLMs never hallucinate\n");
    break;
    case 5: // Friday
    // Generate a random number between 0 and 1
    // If it's 0, print "heads", otherwise print "tails"
    if (rand() % 2 == 0)
    printf("heads\n");
    else
    printf("tails\n");
    break;
    default: // All other days
    printf("I'm lost\n");
    }

  • The startup's license prohibits the use of Codestral and its outputs for any commercial activities.

    "We have no idea how we're going to make any serious money on this."

  • Just asking for a friend.

Programmers do it bit by bit.

Working...