harpertoken commited on
Commit
613a3fc
·
verified ·
1 Parent(s): 5f7bf10

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +3 -3
README.md CHANGED
@@ -17,16 +17,16 @@ A `whisper-small` encoder-decoder, fine-tuned on short passages of live micropho
17
 
18
  Two corrections to the previous version of this card, both of which pointed at the wrong model. The metadata claimed a Wav2Vec2 lineage — `facebook/wav2vec2-base-960h` as a base model, and `facebook/multilingual_librispeech` as the training set. Neither is true of the published checkpoint: `config.json` records `_name_or_path: openai/whisper-small` with `WhisperForConditionalGeneration`, and the documented training signal was live recordings, not a fixed corpus. The earlier card also described `main.py`, `train.py`, `test_transcription.py` and a `requirements.txt`; none of those files have ever been in this repository, so the instructions it gave could not be followed.
19
 
20
- The repository is incomplete for standalone use. It contains no tokenizer and no `preprocessor_config.json`, both of which Whisper requires, so the `WhisperProcessor.from_pretrained` call the old card documented fails. Load the processor from `openai/whisper-small` instead, which is the same normalisation and vocabulary the checkpoint was trained against. `training_log.pt` in the repository root is 761 bytes of leftover debug state and can be ignored. `pytorch_model.bin` duplicates `model.safetensors`.
21
 
22
  ## Usage
23
 
24
  ```python
25
  import torch
26
- from transformers import WhisperForConditionalGeneration, WhisperProcessor, pipeline
27
 
28
  model = WhisperForConditionalGeneration.from_pretrained("harpertoken/talk")
29
- processor = WhisperProcessor.from_pretrained("openai/whisper-small") # not in this repo
30
 
31
  transcriber = pipeline(
32
  "automatic-speech-recognition",
 
17
 
18
  Two corrections to the previous version of this card, both of which pointed at the wrong model. The metadata claimed a Wav2Vec2 lineage — `facebook/wav2vec2-base-960h` as a base model, and `facebook/multilingual_librispeech` as the training set. Neither is true of the published checkpoint: `config.json` records `_name_or_path: openai/whisper-small` with `WhisperForConditionalGeneration`, and the documented training signal was live recordings, not a fixed corpus. The earlier card also described `main.py`, `train.py`, `test_transcription.py` and a `requirements.txt`; none of those files have ever been in this repository, so the instructions it gave could not be followed.
19
 
20
+ The tokenizer and the feature extractor are now present in the repository, taken from [`openai/whisper-small`](https://huggingface.co/openai/whisper-small) — the same 51865-token vocabulary and 80-bin mel filterbank the checkpoint expects, since that is what it was fine-tuned from. An earlier version of this repository shipped neither, and `AutoProcessor.from_pretrained` failed outright while `AutoTokenizer` returned a one-token vocabulary. Both are fixed; `WhisperForConditionalGeneration`, `AutoProcessor` and the `automatic-speech-recognition` pipeline now all load from this identifier alone. The repository's own `generation_config.json` was kept as fine-tuned rather than replaced with the upstream one. `training_log.pt` in the root is 761 bytes of leftover debug state and can be ignored. `pytorch_model.bin` duplicates `model.safetensors`.
21
 
22
  ## Usage
23
 
24
  ```python
25
  import torch
26
+ from transformers import WhisperForConditionalGeneration, AutoProcessor, pipeline
27
 
28
  model = WhisperForConditionalGeneration.from_pretrained("harpertoken/talk")
29
+ processor = AutoProcessor.from_pretrained("harpertoken/talk")
30
 
31
  transcriber = pipeline(
32
  "automatic-speech-recognition",