Magicoder S CL 7B
magicoder-s-cl-7bUIUC Magicoder S CL 7B. CodeLlama-7B fine-tuned with OSS-Instruct synthetic data. Strong HumanEval Plus and MBPP Plus performance per parameter.
- Prix
- ≈ 0,0924 $US/exécution
- Contexte
- 16 384 tokens
- Max. sortie
- 4 096 tokens
- Entrée → Sortie
- Texte → Texte
- Développeur
- Community
- Mis à jour
- 23 septembre 2026
Playground
Essayer Magicoder S CL 7B
Entrée et résultat
Cette exécution
environ 0,0924 $US · 9,24 crédits
0,2772 $US (27,72 crédits) sont réservés au démarrage ; le temps GPU réel est facturé.
Pour les comptes sans achat antérieur : les exécutions au-delà de 2 crédits nécessitent un rechargement.
Nouveau par ici ?
10 crédits gratuits (0,10 $US) à l'inscription avec Google
Utilisable 24 heures après l'inscription, jusqu'à 5 exécutions par jour et au maximum 2 crédits par exécution. Les autres méthodes de connexion commencent sans crédits.
Examples
Prompt
Write a snake game in Python using the turtle library (the game is created by Magicoder).
Response
Here is a simple snake game in Python using the turtle library. ```python import turtle import time import random delay = 0.1 # Score score = 0 high_score = 0 # Set up the screen wn = turtle.Screen() wn.title("Snake Game by Magicoder") wn.bgcolor("green") wn.setup(width=600, height=600) wn.tracer(0) # Turns off the screen updates # Snake head head = turtle.Turtle() head.speed(0) head.shape("square") head.color("black") head.penup() head.goto(0, 0) head.direction = "stop" # Snake food food = turtle.Turtle() food.speed(0) food.shape("circle") food.color("red") food.penup() food.goto(0, 100) segments = [] # Pen pen = turtle.Turtle() pen.speed(0) pen.shape("square") pen.color("white") pen.penup() pen.hideturtle() pen.goto(0, 260) pen.write("Score: 0 High Score: 0", align="center", font=("Courier", 24, "normal")) # Functions def go_up(): if head.direction!= "down": head.direction = "up" def go_down(): if head.direction!= "up": head.direction = "down" def go_left(): if head.direction!= "right": head.direction = "left" def go_right(): if head.direction!= "left": head.direction = "right" def move(): if head.direction == "up": y = head.ycor() head.sety(y + 20) if head.direction == "down": y = head.ycor() head.sety(y - 20) if head.direction == "left": x = head.xcor() head.setx(x - 20) if head.direction == "right": x = head.xcor() head.s…
Prompt
Build a simple neural network in Python using Pytorch to classify handwritten digits from the MNIST dataset. You should use CNN as the model structure, train the model for 5 epochs, draw a chart of the training loss, and show the final result.
Response
Here is a simple example of how you can build a convolutional neural network (CNN) using PyTorch to classify handwritten digits from the MNIST dataset. ```python import torch import torch.nn as nn import torch.optim as optim import torchvision import torchvision.transforms as transforms import matplotlib.pyplot as plt # Define the CNN architecture class Net(nn.Module): def __init__(self): super(Net, self).__init__() self.conv1 = nn.Conv2d(1, 32, 3, 1) self.conv2 = nn.Conv2d(32, 64, 3, 1) self.dropout1 = nn.Dropout2d(0.25) self.dropout2 = nn.Dropout2d(0.5) self.fc1 = nn.Linear(9216, 128) self.fc2 = nn.Linear(128, 10) def forward(self, x): x = self.conv1(x) x = nn.functional.relu(x) x = self.conv2(x) x = nn.functional.relu(x) x = nn.functional.max_pool2d(x, 2) x = self.dropout1(x) x = torch.flatten(x, 1) x = self.fc1(x) x = nn.functional.relu(x) x = self.dropout2(x) x = self.fc2(x) output = nn.functional.log_softmax(x, dim=1) return output # Load the MNIST dataset transform = transforms.Compose([transforms.ToTensor(), transforms.Normalize((0.1307,), (0.3081,))]) trainset = torchvision.datasets.MNIST(root='./data', train=True, download=True, transform=transform) trainloader = torch.utils.data.DataLoader(trainset, batch_size=64, shuffle=True) testset = torchvision.datasets.MNIST(root='./data', train=False, dow…
Prompt
Build a simple neural network in Python using Pytorch to classify handwritten digits from the MNIST dataset. You should use CNN as the model structure, train the model for 5 epochs, draw a chart of the training loss, and show the final result.
Response
Here is the Python code to create, train, and evaluate a Convolutional Neural Network (CNN) to classify handwritten digits from MNIST dataset. ```python import torch import torch.nn as nn import torchvision.transforms as transforms import torchvision.datasets as dsets import torch.optim as optim import matplotlib.pyplot as plt # Step 1: Loading Data # Transform the data to torch tensors and normalize it by the mean and std deviation transform = transforms.Compose([ transforms.ToTensor(), transforms.Normalize(mean=(0.5, ), std=(0.5, )) ]) train_dataset = dsets.MNIST(root='./data', train=True, transform=transform, download=True) test_dataset = dsets.MNIST(root='./data', train=False, transform=transform, download=True) # Prepare Data Loaders train_loader = torch.utils.data.DataLoader(dataset=train_dataset, batch_size=100, shuffle=True) test_loader = torch.utils.data.DataLoader(dataset=test_dataset, batch_size=100, shuffle=False) # Step 2: Define Model class CNN(nn.Module): def __init__(self): super().__init__() self.layer1 = nn.Sequential( nn.Conv2d(1, 32, kernel_size=5, padding=2), nn.ReLU(), nn.MaxPool2d(2) ) self.layer2 = nn.Sequential( nn.Conv2d(32, 64, kernel_size=5, padding=2), nn.ReLU(), nn.MaxPool2d(2) ) self.fc = nn.Linear(7*7*64, 10, bias=True) torch.nn.init.xavier_uniform_(self.fc.weight) def forward(self, x):…
À propos de Magicoder S CL 7B
Magicoder S CL 7B est un modèle de Community dans la catégorie Code. Sur Railwail, Magicoder S CL 7B coûte ≈ 0,0924 $US par exécution. La fenêtre de contexte contient 16 384 tokens, et une réponse peut faire jusqu'à 4 096 tokens.
Tarification
| Exécution typique (≈ 79 s sur L40S) | 0,0924 $US par exécution |
|---|---|
| Temps GPU (L40S) | 0,00117Â $US par seconde GPU |
- Facturée selon le temps GPU que l'exécution prend réellement. Au démarrage, 3× le prix typique est réservé de votre solde et régularisé ensuite.
- 1 crédit = 0,01 $US
Calculatrice de coûts
Calculatrice de prix
Typique selon le fournisseur : environ 79 s
Total
9,24Â $US
924 crédits
Par exécution
0,0924 $US · 9,24 crédits
Facturé selon le temps GPU réel ; ceci est une estimation.
API
Aucun exemple API vérifié
L'API publique transmet un format d'entrée différent de celui dont ce modèle a besoin. Utilisez le playground ci-dessus.
Spécifications
- ID du modèle
magicoder-s-cl-7b- Développeur
- Community
- Catégorie
- Code
- Entrée
- Texte
- Sortie
- Texte
- Fenêtre de contexte
- 16 384 tokens
- Sortie max.
- 4 096 tokens
- Facturation
- À l'usage (tokens ou temps GPU)
- Entrée du catalogue mise à jour
- 23 septembre 2026
Paramètres d'entrée
Entrées et paramètres du schéma d'entrée du modèle. L'exemple dans la section API montre lesquels l'API accepte.
promptObligatoireCode or instruction
Type: TextePar défaut: –Valeurs autorisées: Jusqu'à 8 000 caractèresmodeType: ChoixPar défaut:completeValeurs autorisées: complete, explain ou refactortop_pType: NombrePar défaut:0.95Valeurs autorisées: 0 à 1streamType: Oui/NonPar défaut:falseValeurs autorisées: –languageType: ChoixPar défaut:pythonValeurs autorisées: python, typescript, javascript, rust, go, java, cpp, csharp, ruby ou phpmax_tokensType: Nombre entierPar défaut:1024Valeurs autorisées: 1 à 4 096temperatureType: NombrePar défaut:0.2Valeurs autorisées: 0 à 2
Étiquettes
- replicate
- code-generation
- open-weights
- research
Cas d'usage
Questions fréquemment posées
Qu'est-ce que Magicoder S CL 7B ?
Magicoder S CL 7B est un modèle de Community dans la catégorie Code.
Combien coûte Magicoder S CL 7B sur Railwail ?
Sur Railwail, Magicoder S CL 7B coûte ≈ 0,0924 $US par exécution. Vous êtes facturé pour ce que chaque requête utilise réellement. L'utilisation est payée à partir de crédits prépayés ; 1 crédit équivaut à 0,01 $US.
Quelle est la fenêtre de contexte de Magicoder S CL 7B ?
La fenêtre de contexte de Magicoder S CL 7B contient 16 384 tokens. Une réponse peut faire jusqu'à 4 096 tokens.
Quelle est la vitesse de Magicoder S CL 7B ?
Il n'y a pas encore assez d'exécutions mesurées de Magicoder S CL 7B sur Railwail pour indiquer un temps d'exécution. Cela dépend de l'entrée, des paramètres et de la charge chez le fournisseur.
Magicoder S CL 7B est-il meilleur que Code Llama 13B Instruct ?
Cela dépend de la tâche. Magicoder S CL 7B (Community) et Code Llama 13B Instruct (Meta) sont tous deux des modèles de la catégorie Code. La page de comparaison affiche leurs prix et spécifications côte à côte.
Comparer Magicoder S CL 7B et Code Llama 13B InstructModèles comparables
Tous dans cette catégorieMeta's 13B Code Llama tuned for instruction following. A faster mid-size option for code generation and completion, supporting infilling for inserting code at a cursor position. Served on Replicate per call.
≈ 0,0065 $US/exécution
93 % moins cher par unité
Comparer Magicoder S CL 7B et Code Llama 13B InstructMeta's 34B Code Llama tuned for instruction following. A balance of size and quality for code generation, completion, and explanation, with strong coverage of Python, JavaScript, and other common languages. Runs on Replicate per call.
≈ 0,0408 $US/exécution
56 % moins cher par unité
Comparer Magicoder S CL 7B et Code Llama 34B InstructMeta's largest Code Llama, a 70B Llama-2 derivative specialized for programming and tuned to follow instructions in chat form. Handles code generation, completion, and explanation across common languages. Served on Replicate as a per-call endpoint.
≈ 0,0504 $US/exécution
45 % moins cher par unité
Comparer Magicoder S CL 7B et Code Llama 70B Instruct
Tous les modèles via une API
Une clé API pour tous les modèles sur Railwail. L'utilisation est facturée à partir de crédits prépayés, 1 crédit = 0,01 $US.