◂ BACK TO LEADERBOARD
▚ MODEL AUDIT // GGUF

// Gemma 4 31B

FLAWS — Minor Logic Flaws 78/100 tests: PASS
⚠ SPEED CAVEAT: All Gemma 4 models ran abnormally slow (GPU offload appeared inactive despite being set), so tok/sec and TTFT are NOT representative of the model itself — likely an LM Studio/GGUF config issue. Treat speed numbers for the Gemma 4 batch as suspect.
tok/sec10.09
tokens4536
TTFT4.39s

▮ PILLAR BREAKDOWN

Complexity (O(1))
17/20
Concurrency / Races
16/20
Tx Isolation
14/20
Memory & Edges
15/20
Test Integrity
16/20

✓ WENT RIGHT

  • Complexity (O(1)) (17/20)
  • Concurrency / Races (16/20)
  • Test Integrity (16/20)

✗ WENT WRONG

  • No pillar fell below 14 — solid across the board.

▮ CRITICAL BUGS

▮ RECOMMENDED USE

Clean, correct, runnable code with solid O(1) structure and good concurrency granularity. A reliable pick for everyday caching/async work after a monotonic-clock + __slots__ pass.

▮ REFACTORED PATCH

# FIX 1 (the isolation leak): tx reads must NOT mutate global freq.
# Add a read-only global lookup (no _update_frequency) and use it in tx.get:
async def _read_raw(self, key):           # no freq bump
    node = self.cache.get(key)
    if node is None: return None
    if time.monotonic() > node.expiry:
        await self._delete_internal(key)
        return None
    return node.value
# then in Transaction.get fallback:
    return await self._cache._read_raw(key)   # NOT cache.get

# FIX 2: time.time() -> time.monotonic() everywhere (get/put/_put_internal/bg loop).
# FIX 3: add __slots__ to Node, DoublyLinkedList, LFUCache, Transaction.
# FIX 4: prune empty freq buckets on delete, or have _evict_lfu drop them.
# FIX 5: iterate a dedicated _ttl_keys set (batched) in the bg evictor
# instead of list(self.cache.keys()) to stay O(batch), not O(N).