You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Well, exit code 17 is operation is not implemented:
/// Operation is not yet implemented.
NotImplemented = 0x11,
This means, that some operations used by the model are not supported. Please run the model on android, run logcat in a separate terminal and check in the logs which operation is not implemented. By the way, what kind of model have you exported, LLM?
Hey @tslater, can you share a code snippet for reproduction? Ideally, we'd love if you opened up an issue explaining what you're trying to achieve and the code snippet, as its easier for us to track it this way. Thanks!
Closing — the ergonomic side of this can't ship today on the default RN stack, and what we can do is already possible without an API change.
FP16: The TS-side win would be accepting a Float16Array in TensorBuffer. TypeScript 5.7+ has the type, but Hermes (the JS engine bundled with current React Native — checked against 0.16.0 / RN 0.81) does not expose Float16Array as a global, so new Float16Array(...) throws ReferenceError at runtime. Until Hermes ships it, exposing the type would only be misleading.
BF16: No JS BFloat16Array exists in any engine.
What works today for either dtype without any binding change: pack the 16-bit values into a Uint16Array (or a raw ArrayBuffer) yourself and pass it as dataPtr with scalarType: ScalarType.HALF (or 15 for BFloat16). The native input path at JsiConversions.h reads the underlying ArrayBuffer raw, so half-precision / bfloat16 bytes flow through ExecuTorch correctly. On output, the result comes back as an ArrayBuffer you interpret the same way.
We can revisit when Hermes adds Float16Array (tracked upstream) and reopen as a docs / typed-array unblock at that point.
Activity
msluszniak commentedon Sep 17, 2025
Are we able to support them considering the fact that fixed width floating point numbers were introduced in c++23? https://en.cppreference.com/w/cpp/types/floating-point.htmltslater commentedon Feb 28, 2026
Is FP16 not supported for useExecutorchModule? I'm having trouble and wanted to confirm.
msluszniak commentedon Mar 1, 2026
Could you describe what troubles do you have? Model that uses fp16 are supported, e.g. lfm2.5 instruct.
tslater commentedon Mar 2, 2026
@msluszniak That's very helpful to know, thanks!
I'm getting this error:
{"code": 17, "message": "The model's forward function did not succeed. Ensure the model input is correct."}I think it might be by exporter's executorch version or something else. I'm going to keep digging on it.
msluszniak commentedon Mar 2, 2026
Well, exit code 17 is operation is not implemented:
This means, that some operations used by the model are not supported. Please run the model on android, run logcat in a separate terminal and check in the logs which operation is not implemented. By the way, what kind of model have you exported, LLM?
chmjkb commentedon Mar 2, 2026
Hey @tslater, can you share a code snippet for reproduction? Ideally, we'd love if you opened up an issue explaining what you're trying to achieve and the code snippet, as its easier for us to track it this way. Thanks!
msluszniak commentedon May 29, 2026
Closing — the ergonomic side of this can't ship today on the default RN stack, and what we can do is already possible without an API change.
FP16: The TS-side win would be accepting a
Float16ArrayinTensorBuffer. TypeScript 5.7+ has the type, but Hermes (the JS engine bundled with current React Native — checked against 0.16.0 / RN 0.81) does not exposeFloat16Arrayas a global, sonew Float16Array(...)throwsReferenceErrorat runtime. Until Hermes ships it, exposing the type would only be misleading.BF16: No JS
BFloat16Arrayexists in any engine.What works today for either dtype without any binding change: pack the 16-bit values into a
Uint16Array(or a rawArrayBuffer) yourself and pass it asdataPtrwithscalarType: ScalarType.HALF(or15for BFloat16). The native input path atJsiConversions.hreads the underlyingArrayBufferraw, so half-precision / bfloat16 bytes flow through ExecuTorch correctly. On output, the result comes back as anArrayBufferyou interpret the same way.We can revisit when Hermes adds
Float16Array(tracked upstream) and reopen as a docs / typed-array unblock at that point.