AlfredPros: CodeLLaMa 7B Instruct Solidity

alfredpros/codellama-7b-instruct-solidity

Access CodeLLaMa 7B Instruct Solidity from AlfredPros using Puter.js AI API.

Get Started
// npm install @heyputer/puter.js
import { puter } from '@heyputer/puter.js';

puter.ai.chat("Explain quantum computing in simple terms", {
    model: "alfredpros/codellama-7b-instruct-solidity"
}).then(response => {
    document.body.innerHTML = response.message.content;
});
<html>
<body>
    <script src="https://js.puter.com/v2/"></script>
    <script>
        puter.ai.chat("Explain quantum computing in simple terms", {
            model: "alfredpros/codellama-7b-instruct-solidity"
        }).then(response => {
            document.body.innerHTML = response.message.content;
        });
    </script>
</body>
</html>
# pip install openai
from openai import OpenAI

client = OpenAI(
    base_url="https://api.puter.com/puterai/openai/v1/",
    api_key="YOUR_PUTER_AUTH_TOKEN",
)

response = client.chat.completions.create(
    model="alfredpros/codellama-7b-instruct-solidity",
    messages=[
        {"role": "user", "content": "Explain quantum computing in simple terms"}
    ],
)

print(response.choices[0].message.content)
curl https://api.puter.com/puterai/openai/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_PUTER_AUTH_TOKEN" \
  -d '{
    "model": "alfredpros/codellama-7b-instruct-solidity",
    "messages": [
      {"role": "user", "content": "Explain quantum computing in simple terms"}
    ]
  }'

Model Card

CodeLLaMa 7B Instruct Solidity is a fine-tuned code generation model specialized in writing Solidity smart contracts from natural language instructions. Built by AlfredPros on top of Meta's CodeLlama 7B Instruct base, it was trained using 4-bit QLoRA on a curated dataset of 6,003 human instruction and Solidity source code pairs.

The model is purpose-built for blockchain and Web3 development workflows — you describe what a smart contract should do in plain English, and it generates the corresponding Solidity code. This makes it a lightweight, focused option for teams building dApps, DAOs, or other on-chain tooling.

With 7 billion parameters and a 4K context window, it's a compact model that prioritizes speed and efficiency over broad generality. Best suited for developers who need fast, domain-specific Solidity generation rather than general-purpose coding assistance.

Context Window 4K

tokens

Max Output 4K

tokens

Input Cost $0.8

per million tokens

Output Cost $1.2

per million tokens

Release Date Sep 7, 2023

 

Model Playground

Try CodeLLaMa 7B Instruct Solidity instantly in your browser.
This playground uses the Puter.js AI API — no API keys or setup required.

Chat alfredpros/codellama-7b-instruct-solidity
Chat with CodeLLaMa 7B Instruct Solidity
Powered by Puter.js

Frequently Asked Questions

How do I use CodeLLaMa 7B Instruct Solidity?

You can access CodeLLaMa 7B Instruct Solidity by AlfredPros through Puter.js AI API. Include the library in your web app or Node.js project and start making calls with just a few lines of JavaScript — no backend and no configuration required. You can also use it with Python or cURL via Puter's OpenAI-compatible API.

Is CodeLLaMa 7B Instruct Solidity free?

Yes, it is free if you're using it through Puter.js. With the User-Pays Model, you can add CodeLLaMa 7B Instruct Solidity to your app at no cost — your users pay for their own AI usage directly, making it completely free for you as a developer.

What is the pricing for CodeLLaMa 7B Instruct Solidity?
Pricing for CodeLLaMa 7B Instruct Solidity is based on the number of input and output tokens used per request.
Price per 1M tokens
Input$0.8
Output$1.2
Who created CodeLLaMa 7B Instruct Solidity?

CodeLLaMa 7B Instruct Solidity was created by AlfredPros and released on Sep 7, 2023.

What is the context window of CodeLLaMa 7B Instruct Solidity?

CodeLLaMa 7B Instruct Solidity supports a context window of 4K tokens. For reference, that is roughly equivalent to 8 pages of text.

What is the max output length of CodeLLaMa 7B Instruct Solidity?

CodeLLaMa 7B Instruct Solidity can generate up to 4K tokens in a single response.

Does it work with React / Vue / Vanilla JS / Node / etc.?

Yes — the CodeLLaMa 7B Instruct Solidity API works with any JavaScript framework, Node.js, or plain HTML through Puter.js. Just include the library and start building. See the documentation for more details.

Get started with Puter.js

Add CodeLLaMa 7B Instruct Solidity to your app without worrying about API keys or setup.

Read the Docs View Tutorials