Common Issues
Runtime bundle or native asset load failure
Symptoms:
- Model fails to load on first run.
- Errors about missing native libs.
Checks:
- Ensure internet connectivity for first runtime bundle resolution.
- Verify your app can access GitHub release endpoints.
- If backend config changed recently, run
flutter cleanonce.
Model path or URL issues
Symptoms:
Failed to load modelerrors.
Checks:
- Confirm path exists and is readable.
- Confirm file is valid GGUF.
- For URL loading, confirm backend/platform supports URL model load.
Slow generation
Checks:
- Reduce model size or quantization level.
- Tune
contextSizeand generation length (maxTokens). - Use appropriate backend and GPU offload (
gpuLayers).
Tool calling seems unstable
Checks:
- Use
ToolChoice.autobefore forcingrequired. - Lower temperature for tool-calling requests.
- Validate tool schema and required parameters.
- Ensure your loop appends tool result messages correctly.
Web behavior differs from native
Checks:
- Confirm bridge runtime is loaded successfully.
- Verify browser WebGPU support and fallback behavior.
- Validate model URLs and CORS policy for hosted assets.
High log noise
Use split log levels:
await engine.setDartLogLevel(LlamaLogLevel.warn);
await engine.setNativeLogLevel(LlamaLogLevel.error);