Skip to content
Open
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,18 @@
-1,
1
]
},
{
"name": "attention_mask",
"dtype": "int64",
"shape": [
1,
16000
],
"value_range": [
0,
2
]
}
],
"output_tensors": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,18 @@
-1,
1
]
},
{
"name": "attention_mask",
"dtype": "int64",
"shape": [
1,
16000
],
"value_range": [
0,
2
]
}
],
"output_tensors": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,18 @@
-1,
1
]
},
{
"name": "attention_mask",
"dtype": "int64",
"shape": [
1,
16000
],
"value_range": [
0,
2
]
}
],
"output_tensors": [
Expand Down Expand Up @@ -57,6 +69,24 @@
"loader": {
"task": "automatic-speech-recognition",
"model_class": "AutoModelForCTC",
"model_type": "wav2vec2"
"model_type": "wav2vec2",
"target_lang": "eng"
},
"eval": {
"task": "automatic-speech-recognition",
"dataset": {
"path": "google/fleurs",
"name": "en_us",
"split": "validation",
"samples": 2,
"shuffle": false,
"seed": 42,
"streaming": false,
"revision": "70bb2e84b976b7e960aa89f1c648e09c59f894dd",
"columns_mapping": {
"input_column": "audio",
"label_column": "transcription"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,18 @@
-1,
1
]
},
{
"name": "attention_mask",
"dtype": "int64",
"shape": [
1,
16000
],
"value_range": [
0,
2
]
}
],
"output_tensors": [
Expand All @@ -38,6 +50,24 @@
"loader": {
"task": "automatic-speech-recognition",
"model_class": "AutoModelForCTC",
"model_type": "wav2vec2"
"model_type": "wav2vec2",
"target_lang": "eng"
},
"eval": {
"task": "automatic-speech-recognition",
"dataset": {
"path": "google/fleurs",
"name": "en_us",
"split": "validation",
"samples": 2,
"shuffle": false,
"seed": 42,
"streaming": false,
"revision": "70bb2e84b976b7e960aa89f1c648e09c59f894dd",
"columns_mapping": {
"input_column": "audio",
"label_column": "transcription"
}
}
}
}
1 change: 1 addition & 0 deletions src/winml/modelkit/build/hf.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,7 @@ def _load_model(
hf_config=hf_config,
model_type=model_type,
attn_implementation=attn_implementation,
target_lang=config.loader.target_lang,
)
return pytorch_model

Expand Down
2 changes: 2 additions & 0 deletions src/winml/modelkit/commands/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -2068,6 +2068,7 @@ def _build_hf_pipeline(

max_iters: int = extra_kwargs.pop("hack_max_optim_iterations", 3)
allow_unsupported_nodes: bool = extra_kwargs.pop("allow_unsupported_nodes", False)
skip_optimize: bool = extra_kwargs.pop("skip_optimize", config.skip_optimize)
model_label = model_id or "random-init"

# ── Validate + setup ─────────────────────────────────────────
Expand Down Expand Up @@ -2153,6 +2154,7 @@ def _name(base: str) -> str:
show_io_first=False,
analyze_output_path=analyze_result_path,
allow_unsupported_nodes=allow_unsupported_nodes,
skip_optimize=skip_optimize,
)

# Persist config after autoconf
Expand Down
3 changes: 3 additions & 0 deletions src/winml/modelkit/eval/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@


if TYPE_CHECKING:
from .ctc_asr_evaluator import WinMLCTCASREvaluator
from .depth_estimation_evaluator import WinMLDepthEstimationEvaluator
from .feature_extraction_evaluator import WinMLFeatureExtractionEvaluator
from .fill_mask_evaluator import WinMLFillMaskEvaluator
Expand Down Expand Up @@ -47,6 +48,7 @@

_LAZY_ATTRS: dict[str, str] = {
# Evaluators
"WinMLCTCASREvaluator": ".ctc_asr_evaluator:WinMLCTCASREvaluator",
"WinMLDepthEstimationEvaluator": ".depth_estimation_evaluator:WinMLDepthEstimationEvaluator",
"WinMLFeatureExtractionEvaluator": (
".feature_extraction_evaluator:WinMLFeatureExtractionEvaluator"
Expand Down Expand Up @@ -126,6 +128,7 @@ def __dir__() -> list[str]:
"SpearmanCorrelationMetric",
"TensorSimilarityEvaluator",
"TopKAccuracyMetric",
"WinMLCTCASREvaluator",
"WinMLDepthEstimationEvaluator",
"WinMLEvaluationConfig",
"WinMLEvaluator",
Expand Down
Loading
Loading