File size: 1,169 Bytes
ad7a3dd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Conversion record

How `model.safetensors` was produced from Google's original TensorFlow artifact.
These scripts are kept as a record. They are not needed to use the model.

1. `inspect_google_tensorflow.py`: lists the original SavedModel's graph and
   variables (TensorFlow 2.x, CPU).
2. `google_tensorflow_reference.py`: extracts the 96 trained variables, the
   Hann window and the mel matrix exactly as the graph computes them, and runs
   the original model on reference clips. The reference clips came from the
   training project's private feature cache. That step cannot be reproduced
   from this repository, but its outputs are summarised in `../qualification/`.
3. `convert_google_weights.py`: maps the variables to the PyTorch module in
   `naptrap.google` (HWIO→OIHW kernels, and the first kernel's inference-time
   zero-mean subtraction applied ahead of time). It writes `model.pt`
   (sha256 `20c27209…b246`).
4. `to_safetensors.py`: repackages `model.pt` as `model.safetensors`. Every
   tensor is checked to be bit-identical.

The `../qualification/` reports were measured against `model.pt`. Its tensors
are identical to `model.safetensors`.