Skip to content

init() fails on official needle-cq4.zip — missing layer_N_post_attn_norm.weights #31

Description

@joshuagamboa

Before submitting a new issue

  • I tested using the latest version of the library, as the bug might be already fixed.
  • I tested using a supported version of react native.
  • I checked for possible duplicate issues, with possible answers.

Bug summary

Downloaded the only model artifact published for needle (needle-cq4.zip from Cactus-Compute/needle on Hugging Face), extracted it, and called CactusLM.init(). It throws:

Exception during init: Cannot open file for mapping: .../needle-cq4/layer_0_post_attn_norm.weights

I checked the zip contents — for every layer (0–11) it ships layer_N_input_norm, layer_N_attn_q_norm, and layer_N_attn_k_norm.weights, but layer_N_post_attn_norm.weights doesn't exist anywhere in the archive. The native loader seems to require that file unconditionally instead of treating it as optional.

Tested on:

  • cactus-react-native@1.13.1 (latest on npm)
  • Physical iPhone, iOS / Xcode 26.6

There is no newer SDK version and no alternate model artifact to try — so as far as I can tell, this blocks needle entirely on the current release.

Library version

1.13.1

Environment info

Node: v22.22.2
npm: 10.9.7
macOS: 26.5.2 (build 25F84), arm64 (Apple Silicon)
Xcode: 26.6 (build 17F113)
Target: physical iPhone (on-device, dev build via expo run:ios)
react-native: 0.86.0
expo: ~57.0.0 (CLI 57.0.4)
cactus-react-native: 1.13.1
react-native-nitro-modules: 0.33.9

Steps to reproduce

Steps to reproduce

  1. Download needle-cq4.zip from https://huggingface.co/Cactus-Compute/needle/resolve/main/needle-cq4.zip (the only model artifact published in that HF repo).
  2. Extract it to a local directory (flat file layout, no subfolders), e.g., iOS app cache dir.
  3. Construct and initialize the model, pointing to that directory:
    const model = new CactusLM({ model: extractedDirPath });
    await model.init();
  4. init() throws:
    Exception during init: Cannot open file post_attn_norm.weights
    

Reproducible example repository

https://github.com/joshuagamboa/needle-cq4-init-repro

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions