Skip to content

Python API Model.from_pretrained() does not accept CLI aliases #74

@unamedkr

Description

@unamedkr

Description

The CLI accepts aliases like llama3.2:1b and smollm2, but Model.from_pretrained() only accepts full canonical names like "Llama-3.2-1B".

Steps to Reproduce

from quantcpp import Model

# This fails:
m = Model.from_pretrained("llama3.2:1b")
# → ValueError: Unknown model 'llama3.2:1b'

# This works:
m = Model.from_pretrained("Llama-3.2-1B")

Expected

Both CLI and Python API should accept the same aliases.

Suggested Fix

Import MODEL_ALIASES from cli.py into __init__.py and resolve aliases in from_pretrained().

Environment

  • quantcpp 0.12.1 (PyPI)

Reported by ClawTeam Claw-1 (Quickstart persona) — Round 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions