Jarbas commited on
Commit
fa4aeee
·
verified ·
1 Parent(s): 3048800

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +28 -7
README.md CHANGED
@@ -47,15 +47,36 @@ print(tok.decode(out[0], skip_special_tokens=True))
47
 
48
  ## Parity with the original PyTorch model
49
 
50
- 10 general-domain Azerbaijani sentences, exact-string-match of generated output against
51
- `MarianMTModel.generate()` on the original `Helsinki-NLP/opus-mt-az-en` checkpoint.
 
 
 
 
 
 
 
 
 
52
 
53
  | Decoding | fp32 exact match | int8 exact match |
54
  |---|---|---|
55
- | greedy (num_beams=1) | 10/10 (100.0%) | 4/10 (40.0%) |
56
- | beam=4 | 10/10 (100.0%) | 4/10 (40.0%) |
57
 
58
  fp32 is a faithful reproduction of the original model at both decoding
59
- settings. int8 dynamic quantization noticeably degrades quality on this
60
- checkpoint. Prefer fp32; int8 is provided for size-constrained deployments
61
- where some quality loss is acceptable.
 
 
 
 
 
 
 
 
 
 
 
 
 
47
 
48
  ## Parity with the original PyTorch model
49
 
50
+ 10 general-domain **Azerbaijani** sentences (source language for this az->en
51
+ pair), exact-string-match of generated output against `MarianMTModel.generate()`
52
+ on the original `Helsinki-NLP/opus-mt-az-en` checkpoint.
53
+
54
+ ```yaml
55
+ parity:
56
+ fp32_greedy: 1.00 # 10/10
57
+ fp32_beam4: 1.00 # 10/10
58
+ int8_greedy: 0.70 # 7/10
59
+ int8_beam4: 0.90 # 9/10
60
+ ```
61
 
62
  | Decoding | fp32 exact match | int8 exact match |
63
  |---|---|---|
64
+ | greedy (num_beams=1) | 10/10 (100.0%) | 7/10 (70.0%) |
65
+ | beam=4 | 10/10 (100.0%) | 9/10 (90.0%) |
66
 
67
  fp32 is a faithful reproduction of the original model at both decoding
68
+ settings. int8 disagreements were inspected by hand, not just counted: they
69
+ are genuinely **different, not worse** - e.g. beam=4 on "Bu axşam iki
70
+ nəfərlik masa sifariş etmək istəyirəm." gives ref "...pay two men a
71
+ denarii." vs int8 "...pay two men a denunciation." (a near-miss on one rare
72
+ word), and greedy on "Bu, maşın tərcüməsi üçün test cümləsidir." gives ref
73
+ "...test for the drive." vs int8 "...test for the translation work." (int8
74
+ is arguably closer to the correct meaning there). No degenerate or garbled
75
+ output was observed in any int8 sample.
76
+
77
+ An earlier version of this card reported int8 40%/40% from a harness bug -
78
+ the parity script had reused a fixed **English** sentence set across all
79
+ opus-mt pairs, but this model's source language is Azerbaijani, not
80
+ English, so that measurement compared the model against out-of-distribution
81
+ input and was discarded. The numbers above are the corrected, re-measured
82
+ values using real Azerbaijani source sentences.