A Streamlit-based web interface for customizing and comparing models available through Ollama. This tool provides an intuitive interface for creating custom model assistants through adjusting model parameters and system messages and chatting with the new model.
- 📊 Side-by-side model comparison interface
- 🔄 Real-time model response previews
- 📝 Custom system prompt configuration
- 🌡️ Adjustable model parameters (temperature, context window)
- Python 3.8 or higher
- Ollama installed and running
- At least one base model pulled in Ollama (e.g., llama2, mistral, etc.)
- Clone this repository:
git clone <repository-url>
cd <repository-name>
- Create and activate a virtual environment (optional but recommended):
python -m venv venv
source venv/bin/activate # On Windows, use: venv\Scripts\activate
- Install required packages:
pip install streamlit
- Start the Streamlit application:
streamlit run main.py
- Access the web interface at
http://localhost:8501
-
Select a base model from the dropdown menu
-
Configure model parameters:
- Temperature (controls response randomness)
- Context Window Size (determines token context length)
- Model Name (for your fine-tuned version)
- System Prompt (defines model behavior)
-
Review the previews:
- Training data preview
- Formatted data structure
- Complete Modelfile content
-
Click "Create Custom Model" to start the fine-tuning process
- Navigate to the "Chat with Model" tab
- Select two models to compare
- Enter your prompt in the text input
- View responses side-by-side
This tool uses Ollama's model creation API to perform creation. The process involves:
-
Creating a Modelfile with:
- Base model specification
- System prompt
- Model parameters
-
Using Ollama's create command to generate a new model based on the Modelfile
For more information about Ollama's fine-tuning capabilities:
- Model creation time varies based on hardware and base model size
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.