Skip to content

Generate an Ollama Modelfile on export #73

Description

@will-lamerton

Problem

After nanotune export you have a GGUF file and no guidance on running it anywhere other than Nanotune. Ollama is the most common destination for a local GGUF, and getting a fine-tune into it requires hand-writing a Modelfile — including re-deriving the system prompt and template, which Nanotune already knows from config.json.

Proposal

nanotune export --ollama writes a Modelfile next to the GGUF:

FROM ./my-model-q4_k_m.gguf
SYSTEM """<contextMessage.content from config.json>"""

Print the follow-up command on success:

ollama create my-model -f .nanotune/models/Modelfile

Acceptance criteria

  • Modelfile is generated with the project's system prompt embedded
  • Path in FROM is correct relative to the Modelfile
  • Success output tells the user exactly what to run next
  • Documented in docs/commands/export.md

Notes

Good first issue — one template string, one file write, one docs update. Everything it needs is already loaded in src/commands/export.tsx via loadConfig() and resolveContextMessage().

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions