Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Installation of OpenCode and use with local LLM's

This repository contains bash scripts for installing OpenCode and for running it with local LLM's.

Overview

The bin directory contains the following bash scripts:

bin/
└── download_install.sh

Download and Install

Enter the bin directory and type the following command.

# Command
./download_install.sh

Configuration of local LLM's

Edit the opencode.json file:

# Edit
~/.config/opencode/opencode.json

Configure the local LLM's. The ID name values here refer to the config.yaml configuration file in ed_llama-swap

{
    "$schema": "https://opencode.ai/config.json",
    "provider": {
        "llama-swap": {
            "npm": "@ai-sdk/openai-compatible",
            "name": "llama-swap (Local)",
            "options": {
                "baseURL": "http://127.0.0.1:8080/v1"
            },
            "models": {
                "qwen3.6-27b-q4": {
                    "name": "qwen3.6-27b-q4",
                    "modalities": {
                        "input": ["text", "image"],
                        "output": ["text"]
                    },
                    "limit": {
                        "context": 163840,
                        "output": 32768
                    }
                },
                "qwen3.6-27b-q5": {
                    "name": "qwen3.6-27b-q5",
                    "modalities": {
                        "input": ["text", "image"],
                        "output": ["text"]
                    },
                    "limit": {
                        "context": 131072,
                        "output": 32768
                    }
                },
                "qwen3.6-35b-a3b-q4": {
                    "name": "qwen3.6-35b-a3b-q4",
                    "modalities": {
                        "input": ["text", "image"],
                        "output": ["text"]
                    },
                    "limit": {
                        "context": 196608,
                        "output": 32768
                    }
                },
                "qwen3.6-35b-a3b-q5": {
                    "name": "qwen3.6-35b-a3b-q5",
                    "modalities": {
                        "input": ["text", "image"],
                        "output": ["text"]
                    },
                    "limit": {
                        "context": 114688,
                        "output": 32768
                    }
                },
                "qwen3-vl-30b-a3b-instruct-q4": {
                    "name": "qwen3-vl-30b-a3b-instruct-q4",
                    "modalities": {
                        "input": ["text", "image"],
                        "output": ["text"]
                    },
                    "limit": {
                        "context": 155648,
                        "output": 32768
                    }
                },
                "qwen3-vl-32b-instruct-q4": {
                    "name": "qwen3-vl-32b-instruct-q4",
                    "modalities": {
                        "input": ["text", "image"],
                        "output": ["text"]
                    },
                    "limit": {
                        "context": 49152,
                        "output": 32768
                    }
                },
                "gemma-4-12b-it-q8": {
                    "name": "gemma-4-12b-it-q8",
                    "modalities": {
                        "input": ["text", "image"],
                        "output": ["text"]
                    },
                    "limit": {
                        "context": 131072,
                        "output": 32768
                    }
                },
                "gemma-4-26b-a4b-it-q5": {
                    "name": "gemma-4-26b-a4b-it-q5",
                    "modalities": {
                        "input": ["text", "image"],
                        "output": ["text"]
                    },
                    "limit": {
                        "context": 196608,
                        "output": 32768
                    }
                },
                "gemma-4-31b-it-q4": {
                    "name": "gemma-4-31b-it-q5",
                    "modalities": {
                        "input": ["text", "image"],
                        "output": ["text"]
                    },
                    "limit": {
                        "context": 81920,
                        "output": 32768
                    }
                }
            }
        }
    },
    "model": "llama-swap/qwen3.6-27b-q5"
}

Links

GitHub

About

Installation of OpenCode and use with local LLM's

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages