starcoder-1b

PyTorch

4 versions

StarCoder is a code generation model trained on 80+ programming languages.

Run this model

  1. Install our magic package manager:

    curl -ssL https://magic.modular.com/ | bash

    Then run the source command that's printed in your terminal.

  2. Install Max Pipelines in order to run this model.

    magic global install max-pipelines
  3. Start a local endpoint for starcoder/1b:

    max-serve serve --huggingface-repo-id bigcode/starcoderbase-1b

    The endpoint is ready when you see the URI printed in your terminal:

    Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
  4. Now open another terminal to send a request using curl:

    curl -N http://0.0.0.0:8000/v1/chat/completions -H "Content-Type: application/json" -d '{
        "model": "starcoder/1b",
        "stream": true,
        "messages": [
            {"role": "system", "content": "You are a helpful assistant."},
            {"role": "user", "content": "Who won the World Series in 2020?"}
        ]
    }' | grep -o '"content":"[^"]*"' | sed 's/"content":"//g' | sed 's/"//g' | tr -d '
    ' | sed 's/\n/
    /g'
  5. 🎉 Hooray! You’re running Generative AI. Our goal is to make this as easy as possible.

About

StarCoder models are a specialized family of AI systems designed to work with source code. These models are trained using extensive datasets obtained from GitHub, encompassing over 80 programming languages. This targeted training enables the models to understand and generate code snippets effectively, making them powerful tools for developers, educators, and anyone working in or learning programming.

For example, given a simple Python function prompt like:

def print_hello_world():

The model can generate a corresponding and syntactically correct response such as:

    print("Hello world")

This demonstrates the StarCoder model's ability to support code understanding, generation, and potentially automating repetitive tasks in software development. Its vast training across multiple languages ensures versatility and usefulness in diverse coding scenarios.

DETAILS

MODEL CLASS
PyTorch

MODULAR GITHUB

Modular

CREATED BY

bigcode

MODEL

bigcode/starcoderbase-1b

TAGS

arxiv:1911.02150
arxiv:2205.14135
arxiv:2207.14255
arxiv:2305.06161
autotrain_compatible
code
dataset:bigcode/the-stack-dedup
endpoints_compatible
gpt_bigcode
license:bigcode-openrail-m
model-index
pytorch
region:us
safetensors
text-generation
text-generation-inference
transformers

@ Copyright - Modular Inc - 2024