Skip to content

bug: m alora add-readme fails after ~10 minutes for hyphenated or org-namespace repo names #1881

Todo

Description

@markstur

What happened?

m alora add-readme fails to generate a README for repositories whose names are hyphenated or whose namespace is an organization, burning the full rejection-sampling budget (~10 minutes against a local ollama granite4.2:3b) before giving up.

Observed with a real flat-layout repository:

$ m alora add-readme stembolt_failure_dataset.jsonl \
    --basemodel facebook/opt-350m --name peft-internal-testing/opt-350m-lora
Checking peft-internal-testing/opt-350m-lora on Hugging Face (read-only) to detect its adapter layout.
Detected the flat adapter layout in peft-internal-testing/opt-350m-lora.
...
RejectionSamplingStrategy: 100%|██████████| 10/10 [09:44<01:11]
FAILED. Valid: 3/6. Failed:
 - userid must be 'peft-internal-testing'
 - arglist must be a valid Python argument list

userid must be 'peft-internal-testing' failed on 9 of the 10 attempts. With LLM-friendly names the same command succeeds quickly (your-username/stembolts on the first attempt, nfulton/stembolts on the fifth).

What did you expect to happen?

README generation should not depend on the repository name being shaped like the prompt's examples.

How can we reproduce it?

  1. ollama serve with a small model pulled (ollama pull granite4.2:3b).
  2. m alora add-readme docs/examples/aLora/stembolt_failure_dataset.jsonl --basemodel facebook/opt-350m --name peft-internal-testing/opt-350m-lora
  3. Answer no at the upload prompt (not reached here — the failure happens during generation).

The Hub is only read; nothing is uploaded.

Mellea version

main.

Any environmental details we need to know?

ollama with granite4.2:3b. Larger models may satisfy the constraints more often, but the prompt contradiction (below) remains.

Anything else we need to know?

The cause is that the generator asks the LLM to produce two values the code already knows, then enforces them with exact-match requirements, while the prompt simultaneously gives conflicting guidance (cli/alora/readme_generator.py, make_readme_jinja_dict and _make_requirements):

- userid: Set this to "your-username" as a placeholder for the HuggingFace user ID. MUST be {name.split("/")[0]}
- intrinsic_name: A short snake_case identifier for this adapter (e.g., "stembolts"). No hyphens. MUST be {name.split("/")[1]}

For peft-internal-testing/opt-350m-lora the leaf violates "No hyphens" and the namespace is nothing like "your-username", so the MUST constraints contradict the prompt's own examples and a small model cannot reconcile them.

Since userid and intrinsic_name are both derived from --name, which the command already has, the LLM does not need to produce them at all: filling them programmatically and asking the model only for the descriptive fields (high-level description, dataset description, argument list, camel-case name) would remove this failure mode for every repository name and shorten sampling for the friendly ones too. Alternatively, weakening the "no hyphens"/"your-username" guidance when the pinned value contradicts it would help, but keeps a pointless round-trip.

Found while validating #1861 end to end; the affected code predates that PR and behaves the same on main.

Activity

  1. added
    bug
    p2
    area/alora
    area/cli
    on Nov 26, 2026
  2. self-assigned this
    on Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/aloraarea/clibugp2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions