Baltor Get started

Models

CodeLlama-7b-Instruct-hf

By codellama. 6.7 billion parameters, a context window of 16,384 tokens and the licence llama2.

Facts

Released
2023-08-24 the day the repository was first published on Hugging Face Hugging Face, read
Licence
llama2 the licence the model card declares Hugging Face, read
Open weights
Yes the weights are published in this Hugging Face repository Hugging Face, read
Parameters
6.7 billion counted from the safetensors weight files Hugging Face, read
Active parameters
Unknown
Knowledge cutoff
Unknown
Context window
  • 16,384 tokens the maximum position embeddings in the model configuration model configuration, read
Longest output
Unknown
Tool calling
  • No the chat template in the tokenizer configuration has no place for tool definitions Hugging Face, read
Structured output
Unknown
Reasoning controls
Unknown
Inputs and outputs
text in, text out Hugging Face, read
Good for
  • Coding: the maker's name for the model marks it for code Hugging Face, read

Prices

No source lists a price for this model. It may only run on your own hardware.

Run it on your own hardware

Weights are the sizes of the files a source lists, or an estimate from the parameter count where none does. Memory is an estimate: weights plus KV cache plus 512 MiB and 5 percent of the weights for runtime buffers. Check it against your hardware.

QuantizationWeightsMemory at 8,192 tokensMemory at 32,768 tokens
IQ1_S1.4 GiB6.0 GiBBeyond its context
IQ1_M1.5 GiB6.1 GiBBeyond its context
IQ2_XXS1.7 GiB6.3 GiBBeyond its context
IQ2_XS1.9 GiB6.5 GiBBeyond its context
IQ2_S2.0 GiB6.6 GiBBeyond its context
IQ2_M2.2 GiB6.8 GiBBeyond its context
Q2_K2.4 GiB7.0 GiBBeyond its context
IQ3_XXS2.4 GiB7.0 GiBBeyond its context
IQ3_XS2.6 GiB7.2 GiBBeyond its context
IQ3_S2.7 GiB7.4 GiBBeyond its context
Q3_K_S2.7 GiB7.4 GiBBeyond its context
IQ3_M2.9 GiB7.5 GiBBeyond its context
Q3_K_M3.1 GiB7.7 GiBBeyond its context
Q3_K_L3.4 GiB8.0 GiBBeyond its context
IQ4_XS3.4 GiB8.0 GiBBeyond its context
Q4_03.6 GiB8.3 GiBBeyond its context
Q4_K_S3.6 GiB8.3 GiBBeyond its context
Q4_K_M3.8 GiB8.5 GiBBeyond its context
Q5_K_S4.3 GiB9.0 GiBBeyond its context
Q5_K_M4.5 GiB9.2 GiBBeyond its context
Q6_K5.1 GiB9.9 GiBBeyond its context

Start it with a local runtime

  • Ollama
    ollama run hf.co/mradermacher/CodeLlama-7b-Instruct-hf-i1-GGUF:Q4_0
  • LM Studio
    lms get mradermacher/CodeLlama-7b-Instruct-hf-i1-GGUF
    lms server start
  • llama.cpp server
    llama-server -hf mradermacher/CodeLlama-7b-Instruct-hf-i1-GGUF:Q4_0 --jinja
  • vLLM
    vllm serve codellama/CodeLlama-7b-Instruct-hf
  • SGLang
    sglang serve --model-path codellama/CodeLlama-7b-Instruct-hf --port 30000

Use it from your harness

Set up for Ollama with the model hf.co/mradermacher/CodeLlama-7b-Instruct-hf-i1-GGUF:Q4_0. Each endpoint page has the same setup for its own address.

OpenCode

Put this in opencode.json in your project folder:

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "ollama": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Ollama",
      "options": {
        "baseURL": "http://localhost:11434/v1"
      },
      "models": {
        "hf.co/mradermacher/CodeLlama-7b-Instruct-hf-i1-GGUF:Q4_0": {
          "name": "CodeLlama-7b-Instruct-hf"
        }
      }
    }
  }
}
  • OpenCode reads any OpenAI-compatible address through the @ai-sdk/openai-compatible package, and an address that speaks the Responses API through @ai-sdk/openai.

From OpenCode documentation, read .

Pi

Put this in ~/.pi/agent/models.json:

{
  "providers": {
    "ollama": {
      "baseUrl": "http://localhost:11434/v1",
      "api": "openai-completions",
      "apiKey": "ollama",
      "models": [
        {
          "id": "hf.co/mradermacher/CodeLlama-7b-Instruct-hf-i1-GGUF:Q4_0"
        }
      ]
    }
  }
}
  • The apiKey field can name an environment variable as $NAME.

From Pi documentation, read .

Codex

Put this in a terminal:

codex --oss --local-provider ollama -m hf.co/mradermacher/CodeLlama-7b-Instruct-hf-i1-GGUF:Q4_0
  • Codex speaks the Responses API only: responses is the one supported wire API of a custom provider. Ollama and LM Studio are built in and start with --oss.

From Codex documentation, read .

Claude Code

Put this in ~/.claude/settings.json, or variables in your shell:

export ANTHROPIC_BASE_URL="http://localhost:11434"
export ANTHROPIC_AUTH_TOKEN="ollama"
export ANTHROPIC_MODEL="hf.co/mradermacher/CodeLlama-7b-Instruct-hf-i1-GGUF:Q4_0"
claude
  • Claude Code sends Anthropic Messages requests to ANTHROPIC_BASE_URL. Anthropic says it does not support routing Claude Code to models other than Claude through any gateway, so some features may not work with another model.

From Claude Code documentation, read .

Published results

These are results other people published. Baltor did not run them and does not rank models by them.