Skip to main content

A lightweight toolkit for LLM fine-tuning, inference optimization, and agent development

Project description

geoffrey-llm

PyPI version Python 3.9+ License

A lightweight toolkit for LLM fine-tuning, inference optimization, and agent development.

Features

  • geocode - Claude Code-like coding assistant with interactive REPL
    • Multi-model support (Kimi, DeepSeek, Qwen, OpenAI-compatible)
    • Memory system with file-based storage
    • MCP (Model Context Protocol) integration
    • Tool calling (File read/write/edit, Bash)
  • More features coming soon (LoRA fine-tuning, GraphRAG, etc.)

Installation

pip install geoffrey-llm

Install with all features

pip install geoffrey-llm[all]

Install geocode only

pip install geoffrey-llm[geocode]

Quick Start

Using geocode (REPL)

# After installing geocode
geocode

# Or specify provider
geocode --provider deepseek --model deepseek-chat

Python API

from geoffrey_llm.geocode import REPL

# Create REPL with default settings
repl = REPL()

# Or with specific provider
from geoffrey_llm.geocode.models.base import get_registry, ModelConfig

config = ModelConfig(model_name="moonshot-v1-8k")
registry = get_registry()
model = registry.create("kimi", config)
repl = REPL(model=model)

geocode Module

geocode is a Claude Code-like coding assistant with:

Features

  • Interactive REPL - Terminal-based chat interface
  • Multi-Model Support - Works with Kimi, DeepSeek, Qwen, and any OpenAI-compatible API
  • Memory System - Persistent memory with file-based storage
  • MCP Integration - Connect to MCP servers for extended capabilities
  • Tool Calling - Built-in tools for file operations and shell commands

Supported Models

Provider Model Names Environment Variable
Kimi (Moonshot) moonshot-v1-8k, moonshot-v1-32k, moonshot-v1-128k KIMI_API_KEY
DeepSeek deepseek-chat, deepseek-coder DEEPSEEK_API_KEY
Qwen (DashScope) qwen-turbo, qwen-plus, qwen-max DASHSCOPE_API_KEY
OpenAI-compatible gpt-3.5-turbo, gpt-4, llama3, etc. OPENAI_API_KEY

Configuration

Create ~/.geoffrey/config.yaml:

model:
  provider: kimi
  model_name: moonshot-v1-8k
  api_key: ${KIMI_API_KEY}  # Or set env var directly

Commands in REPL

Command Description
exit, quit End session
/new Start new session
/resume <id> Resume existing session
/sessions List all sessions
/memory save <type> <content> Save a memory
/memory list [type] List memories
/memory recall <query> Search memories
/mcp list List MCP servers

Memory Types

Type Description
user User preferences, identity
feedback User corrections, feedback
project Project-specific context
reference External reference material

MCP Servers

Configure MCP servers in ~/.geoffrey/mcp.json:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"],
      "env": {}
    }
  }
}

Tool Calling

geocode supports tool calling with built-in tools:

  • FileRead - Read files with line offset/limit
  • FileWrite - Write content to files
  • FileEdit - Edit files using search/replace
  • Bash - Execute shell commands (sandboxed)

Memory System

Memories are stored as markdown files with YAML frontmatter in ~/.geoffrey/memory/:

---
id: mem_abc123
type: user
created_at: 2026-04-18T10:00:00Z
updated_at: 2026-04-18T10:00:00Z
tags:
  - preference
---
User prefers dark mode interface.

Session Management

Sessions are stored as JSON files in ~/.geoffrey/sessions/. Each session contains:

  • Conversation history
  • Project context
  • Model/ provider settings
  • Last active timestamp

License

MIT License

Roadmap

  • LoRA/QLoRA fine-tuning interface
  • Unified inference backend (vLLM, llama.cpp, TensorRT)
  • GraphRAG-lite for knowledge graph RAG
  • Log analysis Agent toolkit
  • Model quantization utilities (AWQ, GPTQ)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

geoffrey_llm-0.1.1.tar.gz (33.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

geoffrey_llm-0.1.1-py3-none-any.whl (43.8 kB view details)

Uploaded Python 3

File details

Details for the file geoffrey_llm-0.1.1.tar.gz.

File metadata

  • Download URL: geoffrey_llm-0.1.1.tar.gz
  • Upload date:
  • Size: 33.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.2

File hashes

Hashes for geoffrey_llm-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5aed3122d88c0ee4b50650a25b8a61dbd8c639924fb68ecb82c75eea79bd5b34
MD5 9ad85d11001bdd1bc9400d5f5ab3ff3a
BLAKE2b-256 4df32981dd3334f941336ef8f4713a80ed320cada61b3ffa3ce4b5e835672f99

See more details on using hashes here.

File details

Details for the file geoffrey_llm-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: geoffrey_llm-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 43.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.2

File hashes

Hashes for geoffrey_llm-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 398e2b94ecdb7f21a97128197aee60172759b0884aad9007d545ae7a19924afa
MD5 e55ee942fd58272f9ea8c7ee4287abb3
BLAKE2b-256 684c773562b6a2c6e11e6d7f6c48ee9bfed9fcb73ed15c92aeee17cf0e26e685

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page