/** * Pure-JS classifier head for cross-encoder/ettin-reranker-32m-v1. * * The upstream ONNX contains only the ModernBERT encoder (last_hidden_state, no * logits). The sentence-transformers head ships as three small safetensors * files: 2_Dense (Linear 384→384, no bias, GELU), 3_LayerNorm, 4_Dense * (Linear 384→1 with bias). Applying them here to the CLS vector reproduces the * model card's reference scores without a PyTorch export step. * * @module v1/cli/memory/reranker-head */ export declare const ETTIN_EXPORT_DIRNAME = "ettin-reranker-32m-v1-onnx"; export declare const ETTIN_HEAD_DIRNAME = "ettin-reranker-32m-v1-head"; export declare const ETTIN_HEAD_FILES: readonly ['2_Dense/model.safetensors', '3_LayerNorm/model.safetensors', '4_Dense/model.safetensors']; export interface F32Tensor { shape: number[]; data: Float32Array; } export interface EttinHead { dense1: F32Tensor; lnWeight: Float32Array; lnBias: Float32Array; dense2: Float32Array; dense2Bias: number; } export type RerankerSource = { kind: 'export' | 'head'; dir: string; }; /** Which reranker can actually produce scores, or null when none can. */ export declare function resolveRerankerSource(modelsDir: string): RerankerSource | null; /** Parse a safetensors buffer holding only float32 tensors. */ export declare function parseSafetensorsF32(buf: Buffer): Record; export declare function loadEttinHead(headDir: string): EttinHead; /** Logit for one query/passage pair from its hidden states (CLS token first). */ export declare function ettinHeadLogit(head: EttinHead, hidden: Float32Array): number; //# sourceMappingURL=reranker-head.d.ts.map