New Model Architecture and Image Generation Fixes
Ollama adds support for the LFM2 architecture with the new LFM2.5-1.2B-Thinking model, while also fixing crucial image generation bugs around model path resolution. The team merged 4 pull requests with significant architectural additions and important configuration fixes.
Duration: PT3M57S
Transcript
Hey there, amazing developers! Welcome back to another episode of the Ollama podcast. I'm so excited to be here with you on this beautiful January 21st, catching up on all the fantastic work that's been happening in our codebase. Grab your favorite beverage because we've got some really exciting updates to dive into today.
So yesterday was absolutely buzzing with activity - we had four merged pull requests and some substantial changes that are going to make your Ollama experience even better. Let me paint you the picture of what's been happening.
The absolute star of the show has to be the addition of LFM2 architecture support. Jeffrey Morgan, with some fantastic collaboration from TommyBoiss, just merged a massive pull request that brings us LFM2.5-1.2B-Thinking model support. And when I say massive, I mean it - we're talking over 3,400 lines of new code across 18 files! This isn't just a small tweak; this is a whole new model architecture that opens up exciting possibilities for thinking-based AI interactions.
What I love about this addition is how thoughtfully it's been implemented. They've added dedicated conversion logic, caching mechanisms, and even comprehensive test coverage. You can see files like `model/models/lfm2/cache.go` with 410 lines of carefully crafted caching logic, and a robust test suite with 444 lines of tests. This is exactly the kind of foundation work that makes me confident about the stability and performance of new features.
Now, speaking of making things work better, we also got a really important fix from next-n that might save you some serious headaches. If you've ever customized your OLLAMA_MODELS directory - maybe you're running under systemd with a custom models path - you might have run into frustrating errors with image generation. The system was stubbornly looking in the default home directory path instead of respecting your custom OLLAMA_MODELS setting. Well, that's fixed now! Image generation will properly use your configured models directory, just like you'd expect.
Jeffrey also cleaned up some technical debt in our testing infrastructure. There was this lingering issue where our image generation tests were trying to import a package that didn't exist, which was breaking `go mod tidy`. It's one of those behind-the-scenes fixes that keeps our development workflow smooth and happy.
And Daniel Hiltgen wrapped things up by adding proper test coverage for our new LFM2.5-thinking model. I always get excited when I see test additions because it means we're building confidence in our features from day one.
What strikes me about today's changes is this beautiful balance between innovation and maintenance. On one hand, we're pushing forward with cutting-edge model architectures like LFM2. On the other hand, we're taking care of our existing features, making sure image generation works reliably across different deployment scenarios.
For those of you working with custom model directories, this image generation fix is going to be a game-changer. And if you're interested in experimenting with thinking-based models, the new LFM2 support gives you a whole new playground to explore.
Here's what I'd love for you to focus on today: If you've been putting off trying image generation because of path issues, now's the perfect time to give it another shot. And if you're feeling adventurous, consider exploring what the new LFM2.5-1.2B-Thinking model can do for your projects. Sometimes these thinking-based approaches can offer really unique perspectives on problem-solving.
Keep building amazing things, keep learning, and remember that every commit, every pull request, every bug fix is moving us all forward together. I'll catch you in the next episode, and until then, happy coding!