Pull Model
Downloads an AI model from the Ollama library to your local server. This is the first step in setting up models for use in your automation workflows.
Model downloads can be large (2-15+ GB). Ensure you have sufficient disk space and a stable internet connection.
Common Properties
- Name - The custom name of the node.
- Color - The custom color of the node.
- Delay Before (sec) - Waits in seconds before executing the node.
- Delay After (sec) - Waits in seconds after executing node.
- Continue On Error - Automation will continue regardless of any error. The default value is false.
If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.
Inputs
- Client ID - The Client ID from the Connect node. Optional if Host URL is provided.
- Model - The name of the model to download (e.g.,
llama3,mistral,codellama,gemma). You can also specify a version tag (e.g.,llama3:8b,mistral:7b-instruct).
Output
This node does not produce an output variable, but it displays download progress in the logs.
Options
- Host URL - Ollama server URL (optional). Use this instead of Client ID for direct connection. Example:
http://localhost:11434
How It Works
The Pull Model node:
- Connects to the Ollama server (via Client ID or Host URL)
- Requests the specified model from the Ollama library
- Downloads the model files to local storage
- Shows progress updates during download
- Completes when the model is fully downloaded and ready to use
Usage Examples
Example 1: Pull a Popular Model
Inputs:
- Model: "llama3"
Progress Log:
- Pulling: downloading manifest
- Pulling: downloading model (1.2 GB / 4.7 GB)
- Pulling: downloading model (2.5 GB / 4.7 GB)
- Pulling: downloading model (4.7 GB / 4.7 GB)
- Pulling: verifying sha256 checksum
- Pulling: success
Example 2: Pull Specific Model Version
Inputs:
- Model: "mistral:7b-instruct-v0.2"
This pulls a specific version rather than the default "latest"
Example 3: Automated Model Setup
// Check if model exists, pull if not
// After List Models node
const models = msg.models;
const requiredModel = 'llama3:latest';
const modelExists = models.some(m => m.name === requiredModel);
if (!modelExists) {
console.log(`Model ${requiredModel} not found, pulling...`);
msg.modelToPull = requiredModel;
// Pull Model node executes here
} else {
console.log(`Model ${requiredModel} already available`);
}
Example 4: Pull Multiple Models
// Pull a set of models for different use cases
const modelsNeeded = [
'llama3:latest', // General purpose
'codellama:latest', // Code generation
'mistral:latest' // Instruction following
];
// Loop through and pull each
for (const modelName of modelsNeeded) {
msg.modelToPull = modelName;
// Pull Model node here
// Add delay between pulls to avoid overwhelming the system
}
Example 5: Pull Based on System Resources
// Select appropriate model based on available memory
const availableRAM = 16; // GB
let modelToPull;
if (availableRAM >= 32) {
modelToPull = 'llama3:70b'; // Large model
} else if (availableRAM >= 16) {
modelToPull = 'llama3:13b'; // Medium model
} else if (availableRAM >= 8) {
modelToPull = 'llama3:8b'; // Standard model
} else {
modelToPull = 'gemma:2b'; // Lightweight model
}
msg.modelToPull = modelToPull;
console.log(`Pulling ${modelToPull} based on ${availableRAM}GB RAM`);
Popular Models
General Purpose Models
- llama3 (4.7 GB) - Meta's latest general-purpose model, excellent for most tasks
- llama3:8b - 8 billion parameter version, good balance
- llama3:70b (39 GB) - Largest version, best quality, needs powerful hardware
- mistral (4.1 GB) - Fast and capable instruction-following model
- mistral:7b-instruct - Instruction-tuned version
- gemma (1.7 GB) - Google's lightweight model
- gemma:2b - Very fast, good for simple tasks
- phi (1.6 GB) - Microsoft's efficient small model
Specialized Models
- codellama (3.8 GB) - Code generation and understanding
- codellama:7b - Smaller code model
- codellama:13b - Larger, more capable
- codellama:34b - Best for complex code tasks
- llama3-gradient - Extended context window version
- neural-chat - Optimized for conversational AI
- starling-lm - Advanced instruction following
Embedding Models
- nomic-embed-text (274 MB) - Text embeddings for search
- mxbai-embed-large (669 MB) - High-quality embeddings
- all-minilm (23 MB) - Lightweight embeddings
Requirements
- Ollama service must be running
- Internet connection for downloading
- Sufficient disk space (check model size first)
- Valid Client ID from Connect node OR Host URL provided
Common Use Cases
- Initial setup of Ollama environment
- Adding new models for different tasks
- Upgrading to newer model versions
- Setting up models on new machines
- Automated environment provisioning
- Testing different models for comparison
- Preparing for offline operation
Tips
Checking Available Models
Visit the Ollama Library to browse available models and their sizes.
Choosing the Right Model
Consider these factors:
-
Task Type
- General chat: llama3, mistral
- Code: codellama
- Fast responses: gemma, phi
- Embeddings: nomic-embed-text
-
System Resources
- 8 GB RAM: gemma:2b, phi
- 16 GB RAM: llama3:8b, mistral:7b
- 32+ GB RAM: llama3:70b, codellama:34b
-
Speed vs Quality
- Fastest: gemma:2b, phi (< 2 GB)
- Balanced: llama3:8b, mistral (4-5 GB)
- Best quality: llama3:70b (39 GB)
Download Time Estimates
Approximate download times (on 100 Mbps connection):
- 1-2 GB models: 2-5 minutes
- 4-5 GB models: 8-12 minutes
- 10+ GB models: 20-40 minutes
- 39 GB models: 60-120 minutes
Optimizing Downloads
- Pull models during off-peak hours
- Pull one model at a time for stability
- Ensure stable internet connection
- Monitor disk space during download
- Use wired connection instead of Wi-Fi for large models
Model Naming Convention
Models follow the pattern: name:tag
llama3=llama3:latest(default tag)llama3:8b- Specific parameter sizemistral:7b-instruct-v0.2- Version and variant
Error Handling
Common errors you might encounter:
- "Failed to pull image" - Network issue or invalid model name
- Model not found - Check model name spelling and availability
- Disk space error - Insufficient storage for the model
- Connection timeout - Unstable internet connection
- Permission denied - Ollama service lacks write permissions
Handling Pull Failures
// Use Continue On Error = true for the Pull Model node
// After Pull Model node
if (msg.error) {
console.error(`Failed to pull ${msg.modelToPull}: ${msg.error}`);
// Try alternative model
if (msg.modelToPull === 'llama3:70b') {
console.log('Falling back to smaller model');
msg.modelToPull = 'llama3:8b';
// Retry with Pull Model node
}
} else {
console.log(`Successfully pulled ${msg.modelToPull}`);
}
Best Practices
- Verify disk space before pulling large models
- Pull during setup rather than at runtime
- Start with smaller models for testing
- Document model requirements in your automation
- Use specific tags instead of
:latestfor reproducibility - Test models after pulling to ensure they work
- Monitor download progress for long-running pulls
- Plan for failures with fallback models
Disk Space Management
Before pulling, calculate space requirements:
const modelSizes = {
'gemma:2b': 1.7,
'phi': 1.6,
'mistral:7b': 4.1,
'llama3:8b': 4.7,
'llama3:13b': 7.4,
'codellama:34b': 19,
'llama3:70b': 39
};
const modelToPull = 'llama3:8b';
const requiredGB = modelSizes[modelToPull];
console.log(`${modelToPull} requires ${requiredGB} GB`);
// Check if you have enough space before pulling
Verifying Successful Pull
After pulling, verify the model is available:
1. Pull Model (model: "llama3")
2. List Models
3. JS Node: Verify model exists
In JS Node:
const models = msg.models;
const pulledModel = models.find(m => m.name.includes('llama3'));
if (pulledModel) {
console.log('Model successfully pulled and available');
} else {
throw new Error('Model pull verification failed');
}
Related Nodes
- List Models - Verify model was pulled successfully
- Show Model Info - Get details about pulled model
- Delete Model - Remove models to free space
- Generate Completion - Use pulled model for generation