Skip to content

armgit / ruflo

Public Imported from GitHub
0

🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

Checkpoint: File edits

rUv201bdde9c546
diff --git a/v3/@claude-flow/cli/src/ruvector/flash-attention.ts b/v3/@claude-flow/cli/src/ruvector/flash-attention.ts
index 1e9ba57676..40a36eab1e 100644
--- a/v3/@claude-flow/cli/src/ruvector/flash-attention.ts
+++ b/v3/@claude-flow/cli/src/ruvector/flash-attention.ts
@@ -69,12 +69,18 @@ export class FlashAttention {
private lastSpeedup: number = 0;
private benchmarkHistory: BenchmarkResult[] = [];
+ // Pre-allocated buffers for CPU optimization
+ private scoreBuffer: Float32Array | null = null;
+ private expBuffer: Float32Array | null = null;
+ private accumBuffer: Float64Array | null = null;
+
constructor(config: Partial<FlashAttentionConfig> = {}) {
this.config = {
- blockSize: config.blockSize ?? 64,
+ blockSize: config.blockSize ?? 32, // Smaller blocks for CPU L1 cache
dimensions: config.dimensions ?? 384,
temperature: config.temperature ?? 1.0,
useStableMode: config.useStableMode ?? true,
+ useCPUOptimizations: config.useCPUOptimizations ?? true,
};
}