crispy-recall 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4594,6 +4594,11 @@ async function startServer() {
4594
4594
  "-ub",
4595
4595
  "8192",
4596
4596
  // micro-batch (ubatch) — also defaults to 512, must be raised
4597
+ // Flash Attention: the attention compute buffer is otherwise O(n²) in the
4598
+ // 8192-token batch (~3.7 GB on GPU), which OOMs cards <6 GB and forces CPU.
4599
+ // -fa makes it O(n) (~0.8 GB → ~2.9 GB total), so 4 GB cards run on GPU,
4600
+ // with numerically identical embeddings (verified cosine 1.0 vs non-FA).
4601
+ "-fa",
4597
4602
  // nomic-embed-text-v1.5 is trained at 2048 ctx and uses Dynamic NTK-aware
4598
4603
  // RoPE scaling to extend to 8192. Without these flags, newer llama.cpp
4599
4604
  // (b9253+) refuses inputs >2048 tokens, and older versions silently
@@ -4801,6 +4806,9 @@ async function embedViaProcess(texts, modelPath) {
4801
4806
  "array",
4802
4807
  "-c",
4803
4808
  "8192",
4809
+ // Flash Attention — see startServer: O(n) attention buffer instead of
4810
+ // O(n²), so the one-shot path also fits cards <6 GB. Identical embeddings.
4811
+ "-fa",
4804
4812
  // Match the YaRN flags on the llama-server batch path — nomic-embed-text-v1.5
4805
4813
  // is trained at 2048 ctx and extends to 8192 via Dynamic NTK-aware RoPE.
4806
4814
  // Without these, newer llama.cpp (b9253+) refuses inputs >2048 tokens here
package/dist/recall.js CHANGED
@@ -3268,6 +3268,11 @@ async function startServer() {
3268
3268
  "-ub",
3269
3269
  "8192",
3270
3270
  // micro-batch (ubatch) — also defaults to 512, must be raised
3271
+ // Flash Attention: the attention compute buffer is otherwise O(n²) in the
3272
+ // 8192-token batch (~3.7 GB on GPU), which OOMs cards <6 GB and forces CPU.
3273
+ // -fa makes it O(n) (~0.8 GB → ~2.9 GB total), so 4 GB cards run on GPU,
3274
+ // with numerically identical embeddings (verified cosine 1.0 vs non-FA).
3275
+ "-fa",
3271
3276
  // nomic-embed-text-v1.5 is trained at 2048 ctx and uses Dynamic NTK-aware
3272
3277
  // RoPE scaling to extend to 8192. Without these flags, newer llama.cpp
3273
3278
  // (b9253+) refuses inputs >2048 tokens, and older versions silently
@@ -3475,6 +3480,9 @@ async function embedViaProcess(texts, modelPath) {
3475
3480
  "array",
3476
3481
  "-c",
3477
3482
  "8192",
3483
+ // Flash Attention — see startServer: O(n) attention buffer instead of
3484
+ // O(n²), so the one-shot path also fits cards <6 GB. Identical embeddings.
3485
+ "-fa",
3478
3486
  // Match the YaRN flags on the llama-server batch path — nomic-embed-text-v1.5
3479
3487
  // is trained at 2048 ctx and extends to 8192 via Dynamic NTK-aware RoPE.
3480
3488
  // Without these, newer llama.cpp (b9253+) refuses inputs >2048 tokens here
@@ -15016,6 +15024,12 @@ async function defaultProbe(args) {
15016
15024
  "array",
15017
15025
  "-c",
15018
15026
  "8192",
15027
+ // Probe with the SAME flags the real embed server uses (esp. -fa). Without
15028
+ // Flash Attention the probe allocates the ~3.7 GB O(n²) attention buffer and
15029
+ // OOMs on a 4 GB card — failing the probe and falling back to CPU even
15030
+ // though the actual -fa server (~2.9 GB) would have fit. Probe must mirror
15031
+ // runtime to gate GPU adoption correctly.
15032
+ "-fa",
15019
15033
  "--rope-scaling",
15020
15034
  "yarn",
15021
15035
  "--rope-freq-scale",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "crispy-recall",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Local session transcript memory for Claude Code and Codex — search past sessions with FTS5 + semantic vectors.",
5
5
  "license": "MIT",
6
6
  "author": "Sylvester Wong",