Skip to content

Export to GGUF and Ollama

Training is only half the job. If your adapted model cannot be used with your local stack, you are not done yet. Exporting properly means preserving behavior, quantizing thoughtfully, and testing in the real app.

  • Understand when to use a separate adapter and when to merge.
  • Prepare GGUF for llama.cpp/Ollama.
  • Create a Modelfile with a system prompt and parameters.

Output workflow

Terminal
adapter LoRA
  -> evaluate
  -> merge with base model if appropriate
  -> export safetensors
  -> convert to GGUF
  -> quantize Q4/Q5/Q8
  -> create Ollama Modelfile
  -> test in the real app

Ollama Modelfile

Terminal
FROM ./soporte-qwen-lora-q5_k_m.gguf

PARAMETER temperature 0.2
PARAMETER num_ctx 4096

SYSTEM """
You are an internal support assistant.
Respond in clear English.
If data is missing, ask for clarification.
Do not invent policies, prices, or personal data.
"""
Terminal
ollama create soporte-pyme -f Modelfile
ollama run soporte-pyme "Classify this sample email"
Complete Aulafy mapSee how this lesson fits without leaving your path.

Complete Aulafy map

How all courses connect

This is not a checklist. Start with the foundation, choose an outcome, and go deeper only when your project needs more control.

  1. 1Understand
  2. 2Apply or build
  3. 3Operate with confidence
01

Choose an application

Turn the foundation into a visible outcome: a website, a business improvement, media, or an interactive experience.

Continue into the technical branch when you need to maintain code, data, or infrastructure.

02

Build with code

Prepare your environment, work with coding agents, and run models while keeping control of your projects.

This branch prepares you to design and operate reliable AI systems.

03

Take systems to production

Combine retrieval, agents, evaluation, security, deployment, and model adaptation when the problem requires it.

You do not need every course: choose the component your system needs and return as it grows.

View full catalogue