musicgen-melody-mic

Slim model weights, executable usage and framework expectations in one repository.

Contract

MIC: MusicGen Melody text- and melody-conditioned music generation

Model integration contract (MIC) for one usage path, across the checkpoints that share it. This repository holds the contract code and the manifest; each framework keeps its own expected results and pins this repository by revision. The model repositories are unchanged. It is a test artifact, not a model: exclude it from model search.

Usage path: AutoProcessor + MusicgenMelodyForConditionalGeneration.generate, text and melody prompts, classifier-free guidance, batched.

File What it is
integration.json Manifest: checkpoints, which fixture covers each, frameworks, entry points, variants, unsupported targets, comparison rules
integrations/transformers/usage.md Transformers contract, written as doc-builder runnable markdown: the same blocks are documentation and test
Checkpoint Slim fixture (every framework PR)
facebook/musicgen-melody hf-internal-testing/mic-musicgen-melody-slim

Checked outputs: input_feature_shape, codes, audio_shape, audio_head, text_only_codes, training.loss, training.gradients, training.updated.

A fixture pass and a real-checkpoint pass have different scopes; either establishes agreement on fixed inputs and a recorded runtime, not correctness on arbitrary inputs.

Slim model

Slim fixture: proto-musicgen-melody-slim

A 3.5M-parameter fixture for the MusicgenMelody MIC, covering facebook/musicgen-melody. It is a test artifact, not a usable model, tagged test-artifact to keep it out of candidate-model search.

  • Fixture key c53f5bcd5ff6. It covers every checkpoint whose processor files are byte-identical and whose config matches after shrinking.
  • Same architecture, smaller config: MusicgenMelodyForConditionalGeneration, shrunk by the generic rule in sweep.py ().
  • Processor files copied byte for byte from facebook/musicgen-melody: generation_config.json, preprocessor_config.json, special_tokens_map.json, spiece.model, tokenizer.json, tokenizer_config.json.
  • Overfit to the contract's training step (60 steps), although random weights passed the input-sensitivity gate: Random weights pass the input-sensitivity gate (teacher-forced logits move), but greedy generation ignores the conditioning: both prompts, with or without a melody, give the same audio codes, so a change that drops the text or melody conditioning would go unseen.
  • Same tensor names as the real checkpoint. The real checkpoint has every parameter, and so does the fixture.
  • Saved in float32, the dtype facebook/musicgen-melody loads in by default.
  • Finite in float32, bfloat16, and float16 (forward, loss, gradients).

Built by build_fixtures.py; build.json records the pinned sources, gate results, and file hashes. This repository includes the slim weights, usage and framework expectations; rebuild the other files with python example/build_fixtures.py --fixture proto-musicgen-melody-slim.

Downloads last month
34
Safetensors
Model size
4.57M params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for huggingface-mic/musicgen-melody-mic

Finetuned
(3)
this model