We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/stalcup-dev/tl-dps-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
CLEANUP_MODELS.md•5.14 kB
# Model Path Cleanup Guide
## Problem Fixed
The app was confused about model locations and had an incorrect SHA hash for the downloaded model. This has been fixed by:
1. **Single runtime directory**: All models now live in `%APPDATA%\DPSCoach\models\`
2. **Unique filenames**: No more generic `model.gguf` - each model has a unique name
3. **Atomic downloads with SHA verification**: Downloads verify hash before finalizing
4. **Clear error messages**: Validation errors now show exact file paths and SHA mismatches
## What Changed
- **Default model path**: `%APPDATA%\DPSCoach\models\qwen2.5-7b-instruct-q4_k_m.gguf`
- **Fallback model path**: `%APPDATA%\DPSCoach\models\qwen2.5-0.5b-instruct-q4_k_m.gguf`
- **Expected SHA for default model**: `8A45E4E923F03F4106BCC375CB83FC383C2C570529ACB2085C6468DF10B50AD5`
- **Expected SHA for fallback model**: `9FECC3B3CD76BBA89D504F29B616EEDF7DA85B96540E490CA5824D3F7D2776A0`
## Cleanup Steps
### 1. Delete the incorrectly downloaded model
```powershell
# This file has wrong SHA (65B8FCD9... instead of expected 8A45E4E9...)
Remove-Item "$env:APPDATA\DPSCoach\models\Qwen2.5-7B-Instruct-Q4_K_M.gguf" -Force
```
### 2. Verify cleanup
```powershell
Get-ChildItem "$env:APPDATA\DPSCoach\models\" -Filter "*.gguf"
```
Should show nothing (or only the fallback model if you want to keep it).
### 3. Download the correct model
**Option A: Use the app UI**
- Launch the app: `python -m app.main`
- Click "Download Model (~4.7 GB)" button
- Wait for download + SHA verification
- App will now validate the correct file
**Option B: Manual download and verify**
```powershell
# Create directory
New-Item -ItemType Directory -Force -Path "$env:APPDATA\DPSCoach\models"
# Download (this will take a while - ~4.7 GB)
$url = "https://huggingface.co/bartowski/Qwen2.5-7B-Instruct-GGUF/resolve/main/Qwen2.5-7B-Instruct-Q4_K_M.gguf"
$dest = "$env:APPDATA\DPSCoach\models\qwen2.5-7b-instruct-q4_k_m.gguf"
Invoke-WebRequest -Uri $url -OutFile $dest
# Verify SHA256
$hash = (Get-FileHash -Path $dest -Algorithm SHA256).Hash
Write-Host "Downloaded SHA: $hash"
Write-Host "Expected SHA: 8A45E4E923F03F4106BCC375CB83FC383C2C570529ACB2085C6468DF10B50AD5"
if ($hash -eq "8A45E4E923F03F4106BCC375CB83FC383C2C570529ACB2085C6468DF10B50AD5") {
Write-Host "✓ SHA matches! Model is valid." -ForegroundColor Green
} else {
Write-Host "✗ SHA mismatch! Delete and re-download." -ForegroundColor Red
}
```
### 4. Optional: Keep fallback model in repo
If you want to use the smaller fallback model (0.5B) from the repo:
```powershell
# Copy to runtime location with correct name
Copy-Item "models\model.gguf" "$env:APPDATA\DPSCoach\models\qwen2.5-0.5b-instruct-q4_k_m.gguf"
# Verify it
Get-FileHash "$env:APPDATA\DPSCoach\models\qwen2.5-0.5b-instruct-q4_k_m.gguf" -Algorithm SHA256
# Should show: 9FECC3B3CD76BBA89D504F29B616EEDF7DA85B96540E490CA5824D3F7D2776A0
# To use fallback model instead of default:
$env:DPSCOACH_USE_FALLBACK_MODEL = "1"
python -m app.main
```
## Verification
### Check model locations
```powershell
powershell scripts\find_models.ps1
```
### Expected output after cleanup:
```
=== GGUF Model Inventory ===
Location: APPDATA\DPSCoach
Path: C:\Users\Allen\AppData\Roaming\DPSCoach
- qwen2.5-7b-instruct-q4_k_m.gguf
Full path: C:\Users\Allen\AppData\Roaming\DPSCoach\models\qwen2.5-7b-instruct-q4_k_m.gguf
Size: 4466.13 MB
SHA256: 8A45E4E923F03F4106BCC375CB83FC383C2C570529ACB2085C6468DF10B50AD5
Location: LOCALAPPDATA\DPSCoach
Path: C:\Users\Allen\AppData\Local\DPSCoach
(directory does not exist)
Location: Repo models
Path: C:\Users\Allen\Desktop\Data Analyst Projects\tl-dps-mcp\models
- model.gguf
Full path: C:\Users\Allen\Desktop\Data Analyst Projects\tl-dps-mcp\models\model.gguf
Size: 637.81 MB
SHA256: 9FECC3B3CD76BBA89D504F29B616EEDF7DA85B96540E490CA5824D3F7D2776A0
```
## Environment Variables
### Model selection
- **Default (Qwen 7B)**: No env var needed
- **Fallback (Qwen 0.5B)**: `$env:DPSCOACH_USE_FALLBACK_MODEL = "1"`
### Coach routing
- **Default (analysis packet)**: No env var needed
- **Legacy SQL mode**: `$env:DPSCOACH_USE_LEGACY_SQL = "1"`
## Troubleshooting
### App shows "Model validation failed: SHA256 mismatch"
- The file is corrupted or incomplete
- Delete it and re-download using the app or manual steps above
- Error message will show expected vs found SHA
### "Model file not found"
- File is not in the expected location
- Run `powershell scripts\find_models.ps1` to see where files are
- Use app download button or manual download steps
### Want to use a different model
Use "Choose Local Model File..." in the app UI - it will validate:
1. GGUF magic header
2. Minimum file size
3. SHA256 (if you configure expected hash in code)
## Summary
- ✓ Runtime models directory: `%APPDATA%\DPSCoach\models\`
- ✓ Default model filename: `qwen2.5-7b-instruct-q4_k_m.gguf`
- ✓ Fallback model filename: `qwen2.5-0.5b-instruct-q4_k_m.gguf`
- ✓ Downloads verify SHA before finalizing (.part → final)
- ✓ Validation errors show exact paths and SHA mismatches
- ✓ No more generic `model.gguf` confusion