CodeGen 350M Mono
350M autoregressive code generation model from Salesforce, the smallest of the original CodeGen family. The mono variant was further trained on Python so it is well suited for short Python completions and program synthesis from a natural-language or code prompt.
CodeGen 350M Mono is code AI model from huggingface, priced at €0.300 per 1M input tokens with a 2.0K tokens context window.
About this model
Pricing
API Integration
Use our OpenAI-compatible API to integrate CodeGen 350M Mono into your application.
npm install railwailimport railwail from "railwail";
const rw = railwail("YOUR_API_KEY");
// Simple — just pass a string
const reply = await rw.run("codegen-350m-mono", "Hello! What can you do?");
console.log(reply);
// With message history
const reply2 = await rw.run("codegen-350m-mono", [
{ role: "system", content: "You are a helpful assistant." },
{ role: "user", content: "Explain quantum computing simply." },
]);
console.log(reply2);
// Full response with usage info
const res = await rw.chat("codegen-350m-mono", [
{ role: "user", content: "Hello!" },
], { temperature: 0.7, max_tokens: 500 });
console.log(res.choices[0].message.content);
console.log(res.usage);Frequently asked questions
Related Models
View all CodeCodestral
Mistral's code-specialized model. Optimized for code generation, completion, and understanding across 80+ languages.
Code Llama 13B Instruct
Meta'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.
Code Llama 34B Instruct
Meta'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.
Code Llama 70B Instruct
Meta'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.
Start using CodeGen 350M Mono today
Get started with free credits. No credit card required. Access CodeGen 350M Mono and 100+ other models through a single API.