File size: 2,490 Bytes
5ecff7c
d510ef0
 
 
5ecff7c
 
 
565fb17
5ecff7c
d510ef0
5ecff7c
565fb17
 
 
 
 
d510ef0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
tags:
  - mic
  - test-artifact
base_model: google-bert/bert-base-uncased
---

# bert-mic

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

- [Contract manifest](integration.json)
- [Transformers usage](integrations/transformers/usage.md)
- [Transformers expectations](integrations/transformers/expectations)
- [Fixture provenance](build.json)

## Contract

### bert model integration contract

Public Transformers usage validated on a slim fixture on an NVIDIA A10G,
with default, eager and bfloat16 variants and fresh-process baseline recording.
This prototype declares fixture-only targets; full checkpoint coverage is separate.

[Regeneration evidence](https://github.com/huggingface/transformers-mic/actions/runs/38252430459).

## Slim model

### Slim fixture: mic-bert-slim

A 2.1M-parameter fixture for the [bert MIC](https://huggingface.co/huggingface-mic/bert-mic), covering [`google-bert/bert-base-uncased`](https://huggingface.co/google-bert/bert-base-uncased). It is a test artifact, not a usable model, tagged `test-artifact` to keep it out of candidate-model search.

- **Fixture key `7ce74647df48`.** It covers every checkpoint whose processor files are byte-identical and whose config matches after shrinking.
- **Same architecture, smaller config:** `BertForMaskedLM`, shrunk by the generic rule in [`sweep.py`](https://github.com/huggingface/transformers-mic/blob/main/experiments/sweep.py) (num_hidden_layers 2).
- **Processor files copied byte for byte** from `google-bert/bert-base-uncased`: `LICENSE`, `tokenizer.json`, `tokenizer_config.json`, `vocab.txt`.
- **Random weights (seed 17).** They passed the input-sensitivity gate: every perturbation of the contract's inputs moved the logits by at least 0.001 (weakest: `attention_mask:all_ones`, 0.00278), so no training was needed.
- **Same tensor names as the real checkpoint.** The real checkpoint has every parameter, and so does the fixture.
- **Saved in float32**, the dtype `google-bert/bert-base-uncased` loads in by default.
- **Finite in float32, bfloat16, and float16** (forward, loss, gradients).

Built by [`build_fixtures.py`](https://github.com/huggingface/transformers-mic/blob/main/example/build_fixtures.py); [`build.json`](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 mic-bert-slim`.