qwen-bg
max-ico04
2K
In
Out
max-ico02
Chat
max-ico03
disable
Replit-Code-v1 (3B)
Access Replit's 2.7B parameter code completion model, along with 100+ AI Models. 20 Supported programming languages in your hands.
Free $1 Tokens for New Members
Text to Speech
                                        const { OpenAI } = require('openai');

const api = new OpenAI({
  baseURL: 'https://api.ai.cc/v1',
  apiKey: '',
});

const main = async () => {
  const result = await api.chat.completions.create({
    model: 'replit/replit-code-v1-3b',
    messages: [
      {
        role: 'system',
        content: 'You are SQL code assistant.',
      },
      {
        role: 'user',
        content: 'Could you please provide me with an example of a database structure that I could use for a project in MySQL?'
      }
    ],
  });

  const message = result.choices[0].message.content;
  console.log(\`Assistant: \${message}\`);
};

main();

                                
                                        import os
from openai import OpenAI


def main():
    client = OpenAI(
        api_key="",
        base_url="https://api.ai.cc/v1",
    )

    response = client.chat.completions.create(
        model="replit/replit-code-v1-3b",
        messages=[
            {
                "role": "system",
                "content": "You are SQL code assistant.",
            },
            {
                "role": "user",
                "content": "Could you please provide me with an example of a database structure that I could use for a project in MySQL?",
            },
        ],
    )

    message = response.choices[0].message.content
    print(f"Assistant: {message}")   

if __name__ == "__main__":
    main()
Docs

One API 300+ AI Models

Save 20% on Costs & $1 Free Tokens
qwenmax-bg
img
Replit-Code-v1 (3B)

Product Detail

🚀 Replit-Code-v1 (3B): Your Advanced AI Code Companion

Discover Replit-Code-v1-3b, a cutting-edge 2.7 billion parameter Causal Language Model engineered by Replit, Inc. Launched in 2023, this model is specifically designed for superior code completion across a diverse ecosystem of programming languages.

Trained on an extensive dataset of 525 billion tokens, covering 20 popular programming languages, Replit-Code-v1-3b offers developers a powerful foundation for building intelligent coding applications.

Model Key Specifications:

  • Model Name: Replit-Code-v1-3b
  • Developer: Replit
  • Release Date: 2023
  • Version: 1.0 (3 Billion parameters)
  • Model Type: Causal Language Model (Code-focused)

🌟 Unrivaled Key Features for Code Development

  • Extensive Permissively Licensed Training Data: Built on a vast, high-quality dataset, ensuring flexibility for commercial use.
  • State-of-the-Art Performance: Achieves leading results on rigorous benchmarks like HumanEval and Multi-PLe, often outperforming larger models.
  • Broad Multi-Language Support: Comprehensive coverage for Replit's top 30 programming languages, enhancing versatility.
  • Advanced Technical Architecture: Incorporates the latest techniques, including Flash Attention, AliBi positional embeddings, and the LionW optimizer, for unparalleled efficiency and accuracy.
  • High-Quality Curated Training Data: Benefits from specialized filtering and meticulous cleaning processes to ensure optimal learning.

🎯 Intended Use: Empowering Developers Without Limits

Replit-Code-v1-3b is designed as a foundational model for developers across various applications. It offers the flexibility for application-specific fine-tuning without strict commercial use limitations, making it ideal for a wide range of innovative projects.

🌐 Extensive Language Support

The model boasts robust support for 20 distinct programming languages, ensuring comprehensive utility for diverse coding environments.

Python JavaScript Java TypeScript PHP HTML CSS SQL C C++ Rust Go Ruby R Shell Markdown JSX reStructuredText Vue Jupyter Notebook

⚙️ Technical Deep Dive: Architecture & Training

Model Architecture

Replit-Code-v1-3b leverages state-of-the-art architectural innovations for peak performance. It integrates Flash Attention and AliBi positional embeddings, significantly boosting efficiency during both training and inference, especially with long input sequences.

Training Data Insights

  • 📖 The model was rigorously trained on a specialized subset of the Stack Dedup v1.2 Dataset.
  • 📖 This subset comprised 175 billion tokens, meticulously selected across 20 programming languages.
  • 📖 The training data underwent 3 epochs of repetition, culminating in an impressive total of 525 billion tokens processed.
  • 📖 Note: The exact knowledge cutoff date for the model's training data remains unknown.

Performance Metrics

  • 📊 When fine-tuned on public Replit user code, Replit-Code-v1-3b demonstrates superior capabilities, effectively outperforming much larger models like CodeLlama7B.
  • 📊 This performance edge is particularly evident on critical benchmarks such as HumanEval and Multi-PLe, underscoring its efficiency and accuracy.

🛠️ Usage & Ethical Considerations

API Example Usage

Integrating Replit-Code-v1-3b into your applications is streamlined through its API. Below is a conceptual example for an OpenAI-compatible chat completion endpoint:

  // Example using an OpenAI-compatible API for code completion const response = await fetch('https://api.replit.com/v1/chat/completions', {   method: 'POST',   headers: {     'Content-Type': 'application/json',     'Authorization': 'Bearer YOUR_API_KEY' // Replace with your actual API key   },   body: JSON.stringify({     model: 'replit/replit-code-v1-3b',     messages: [       { role: 'system', content: 'You are a helpful code completion assistant.' },       { role: 'user', content: 'Write a Python function to reverse a string:' }     ],     max_tokens: 100 // Adjust as needed   }) }); const data = await response.json(); console.log(data.choices[0].message.content);          

Note: The specific snippet element from the original content has been replaced with a conceptual code example for broader compatibility and clarity.

Ethical Guidelines & Responsible AI Use

⚠️ Important Advisory:

While the model's training data underwent robust cleansing filters, users are strongly advised to exercise reasonable caution when deploying the model in production systems. Continuous monitoring and human oversight are recommended to ensure responsible and ethical AI application.

License Information

The model checkpoint and vocabulary file are made available under the Creative Commons license (CC BY-SA-4.0), promoting wide accessibility and collaborative enhancement. The associated source code files are licensed under the more permissive Apache 2.0 license.

❓ Frequently Asked Questions (FAQs)

1. What is Replit-Code-v1-3b primarily used for?

Replit-Code-v1-3b is primarily designed for advanced code completion across multiple programming languages, assisting developers in writing code more efficiently.

2. How many programming languages does it support?

The model supports 20 different programming languages, including popular ones like Python, JavaScript, Java, C++, and many more, making it highly versatile.

3. Is Replit-Code-v1-3b suitable for commercial applications?

Yes, the model is built with permissively licensed training data and offers flexibility for application-specific fine-tuning without strict commercial use limitations.

4. What are its main technical innovations?

It incorporates advanced techniques such as Flash Attention and AliBi positional embeddings for efficient training and inference, along with the LionW optimizer.

5. Does it outperform other larger models?

Yes, when fine-tuned on public Replit user code, Replit-Code-v1-3b has demonstrated superior performance compared to significantly larger models like CodeLlama7B on benchmarks such as HumanEval and Multi-PLe.

AI Playground

Test all API models in the sandbox environment before you integrate. We provide more than 300 models to integrate into your app.
Try For Free
api-right-1
model-bg02-1

One API
300+ AI Models

Save 20% on Costs