Skip to content

Semble 0.5.0 cannot recover from an incomplete Hugging Face model download #222

Description

@Szpadel

After upgrading to Semble 0.5.0, the MCP server started failing when it tried to load the new default model:

ValueError: Could not find expected model files in
~/.cache/huggingface/hub/models--minishlab--potion-code-16M-v2/snapshots/d3daf3e31f36d78f75913030b8bdf4a505d5b833.
Tried model2vec, sentence-transformers, and 0_StaticEmbedding layouts.

I’m running it through Codex as:

uvx --from "semble[mcp]" semble

The Hugging Face snapshot was only partially downloaded. It contained config.json and tokenizer.json, but model.safetensors was missing. The corresponding blob was left as a zero-byte .incomplete file.

Semble loads the model with:

StaticModel.from_pretrained(model_path, force_download=False)

With that option, Model2Vec finds the existing snapshot directory and treats it as cached. It then attempts to load the incomplete directory instead of asking Hugging Face to finish the download. Every subsequent invocation therefore fails with the same error.

Removing the incomplete model cache fixes the problem:

rm -rf ~/.cache/huggingface/hub/models--minishlab--potion-code-16M-v2

The next invocation downloads the model again and can proceed normally.

It would be useful if Semble could recover automatically from an incomplete Hugging Face snapshot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions