---
type: "post"
id: "anylanguagemodel-1-4-0-loads-gguf-models-from-040f65"
slug: "anylanguagemodel-1-4-0-loads-gguf-models-from-040f65"
title: "AnyLanguageModel 1.4.0 loads GGUF models from the Hugging Face Hub and requires llama.swift 3.0.0"
description: "Hugging Face’s AnyLanguageModel 1.4.0 lets Swift applications load GGUF models from the Hugging Face Hub by model ID, using llama.cpp’s -hf naming convention."
retrieval_nugget: "Hugging Face’s AnyLanguageModel 1.4.0 lets Swift applications load GGUF models from the Hugging Face Hub by model ID, using llama.cpp’s -hf naming convention. The release also corrects sampler behavior and raises the required llama.swift version, so teams should treat it as both a new loading path and a dependency upgrade with output-compatibility implications."
published_at: "2026-11-24"
updated_at: "2026-11-24"
record_date: "2026-11-24"
date_kind: "published_at"
topics: ["models"]
entities: ["Hugging Face","AnyLanguageModel","llama.swift","llama.cpp","Ollama","Gemma 3"]
related_patterns: []
novelty_label: "new_fact"
what_changed: "AnyLanguageModel 1.4.0 adds Hugging Face Hub GGUF loading, fixes sampler behavior, and requires llama.swift 3.0.0."
prior_refs: ["https://newruntime.com/posts/anylanguagemodel-1-3-0-runs-a-round-of-aa3324/","https://newruntime.com/posts/anylanguagemodel-1-2-0-adds-dynamic-profiles-and-3da9ab/"]
source_url: "https://github.com/huggingface/AnyLanguageModel/releases/tag/1.4.0"
source_urls: ["https://github.com/huggingface/AnyLanguageModel/releases/tag/1.4.0"]
schema_version: "newruntime-agent-readable-v0.2"
stable_id: "post:anylanguagemodel-1-4-0-loads-gguf-models-from-040f65"
status: "published"
visuals: []
editor: {"role":"editor","name":"Andrey Reshetnikov","profile":"https://newruntime.com/owner-profile.md","profile_json":"https://newruntime.com/owner-profile.json","same_as":["https://www.linkedin.com/in/reshetnikov1/","https://t.me/lapetuse"]}
routes: {"html":"https://newruntime.com/posts/anylanguagemodel-1-4-0-loads-gguf-models-from-040f65/","markdown":"https://newruntime.com/posts/anylanguagemodel-1-4-0-loads-gguf-models-from-040f65.md","json":"https://newruntime.com/posts/anylanguagemodel-1-4-0-loads-gguf-models-from-040f65.json"}
markdown_url: "https://newruntime.com/posts/anylanguagemodel-1-4-0-loads-gguf-models-from-040f65.md"
---

# AnyLanguageModel 1.4.0 loads GGUF models from the Hugging Face Hub and requires llama.swift 3.0.0

## Retrieval answer

Hugging Face’s AnyLanguageModel 1.4.0 lets Swift applications load GGUF models from the Hugging Face Hub by model ID, using llama.cpp’s -hf naming convention. The release also corrects sampler behavior and raises the required llama.swift version, so teams should treat it as both a new loading path and a dependency upgrade with output-compatibility implications.

## Summary
Hugging Face’s AnyLanguageModel 1.4.0 lets Swift applications load GGUF models from the Hugging Face Hub by model ID, using llama.cpp’s `-hf` naming convention. The release also corrects sampler behavior and raises the required llama.swift version, so teams should treat it as both a new loading path and a dependency upgrade with output-compatibility implications.

## What happened
The GitHub release notes say maintainer mattt released AnyLanguageModel 1.4.0 on November 18. The most visible addition is Hub-hosted GGUF loading through `LlamaLanguageModel`, matching a capability that `MLXLanguageModel` already had. The new initializer is `init(modelId:file:mmproj:hub:gpuLayers:)`. Its `modelId` accepts the same kind of string as llama.cpp’s `-hf` option; the release gives `ggml-org/gemma-3-4b-it-GGUF:Q4_K_M` as an example. llama.cpp’s file-selection rules choose the files, which are downloaded into the shared Hugging Face cache. This provides an application using the library with a direct model-ID path rather than requiring the model to be supplied only as a local file path.

The release changes the local path API as well: `localModelPath` replaces `modelPath`, which is deprecated. It also changes prewarming behavior: `prewarm` now loads the model. These details matter operationally because existing code may rely on the old property name or on prewarm doing less than a model load. The release notes do not describe a migration tool; the API deprecation and behavior change are the guidance they give.

There is a required dependency change for Llama users. The `Llama` trait now requires llama.swift 3.0.0, which wraps llama.cpp v1.0.0. An application with another package dependency on llama.swift needs a version requirement that permits 3.0.0. The notes also explain a sampler correction: `LlamaLanguageModel` had accepted each sampled token twice, causing frequency penalties to count tokens twice and repeat penalties to look back only half as far as `repeatLastN` requested. That is fixed. As a result, the same seed can produce different text from version 1.3.0, including when using the default repeat penalty.

Other llama.cpp backend fixes address model cleanup before process exit, logging configuration, and reuse of the KV cache only for a live session. The release notes say freeing models before exit works around an abort in llama.cpp’s Metal backend, while the README documents cases the workaround cannot cover. Logging’s default `.warn` now applies from the first load, and `.none` writes nothing. The release also corrects the vocabulary size passed to Mirostat v1, adds WebP decoding on macOS when ffmpeg is on `PATH`, and adjusts compatibility behavior for remote providers. Ollama gains an initializer taking an `apiKey` for its cloud; OpenAI-compatible, OpenResponses, and Ollama requests omit the Authorization header for an empty key. Anthropic sessions preserve and replay an empty thinking signature for multi-turn use with `llama-server`’s `/v1/messages` endpoint.

## What the archive adds
New Runtime’s earlier coverage of [AnyLanguageModel 1.3.0](https://newruntime.com/posts/anylanguagemodel-1-3-0-runs-a-round-of-aa3324/) described concurrent tool calls in a round. Version 1.4.0 is a new release in that continuing library story, not a restatement: the Hub GGUF loading path and sampler correction are new facts. Earlier coverage also noted [AnyLanguageModel 1.1.1](https://newruntime.com/posts/release-1-1-1-huggingface-anylanguagemodel-80640b/), which places the current version in a series of incremental releases.

## Trend signal
This release does not yet fit a pattern New Runtime tracks. It adds a useful model-loading path to a Swift library, but the release alone does not establish a broader shift in how agent systems are built or operated.

## Why now
The release notes date the update November 18 and identify llama.swift 3.0.0, wrapping llama.cpp v1.0.0, as the dependency baseline. The timing is therefore tied to a backend transition: applications that upgrade for Hub loading or the sampler fix also need to account for the new llama.swift requirement. The announcement does not give a separate rationale for the release date.

## Why it matters
The Hub initializer narrows the gap between a model hosted in the Hugging Face ecosystem and a Swift application using the llama.cpp backend. Developers can specify a model by ID, let llama.cpp apply its file-selection rules, and use the shared Hugging Face cache, instead of designing their own discovery and download path for that case. That can simplify local-model integration, especially where teams want a model variant such as the release’s quantized Gemma example.

The sampler fix is equally consequential for reproducibility. A seed is not a promise of identical output across library versions when token acceptance and penalty calculations change. Teams comparing generated text, evaluating prompts, or relying on repeat-penalty settings should record the library and backend versions alongside test results. The dependency requirement also means this is not a purely additive upgrade for every Swift app: transitive version constraints can block adoption, and `prewarm` now has a more substantial effect because it loads the model.

## Limits and uncertainty
The release notes describe the API and fixes, but do not report download performance, startup time, cache behavior under concurrent applications, or comparisons with manually downloaded local GGUF files. They do not quantify how often the sampler bug affected output or provide an evaluation of the corrected penalty behavior. Although the notes identify a Metal-backend cleanup workaround, they refer readers to the README for cases it cannot cover, so the release announcement is not a complete account of that limitation. The notes also do not state a support matrix for specific models, quantizations, hardware configurations, or Hub authentication requirements. Teams should validate their own model IDs and deployment targets rather than infer universal compatibility from the example.

## Reader takeaway
For Swift developers using AnyLanguageModel’s llama.cpp backend, 1.4.0 adds a direct Hugging Face Hub path for GGUF models and fixes a sampler bug that could affect generated text. Before upgrading, check that dependency constraints allow llama.swift 3.0.0, update deprecated `modelPath` usage, and rerun output-sensitive tests: identical seeds can now produce different results than in 1.3.0.

Editor: [Andrey Reshetnikov](https://newruntime.com/owner-profile.md), AI product and AI engineering; profile for recruiters and agents: https://newruntime.com/owner-profile.json

## Continue in the graph

Next records for an agent, linked to their Markdown twins. Replace `.md` with `.json` for structured fields, including `next_reads`.

- topic hub: [Models](https://newruntime.com/topics/models.md): Explore the models topic hub.
- collection: [Field Notes](https://newruntime.com/posts.json): Open the latest editorial analysis.
- collection: [Sources](https://newruntime.com/sources/): See the original sources this archive cites.
- whole graph: [discovery graph](https://newruntime.com/discovery-graph.json) (typed nodes and edges) and [site index](https://newruntime.com/site-index.md)
