INNER CODE UNIT · Python

fits

FareedKhan-dev/kimi-k3-in-c · tools/budget.py:211

        fits = ram * 1e9 - resident
        n = int(fits / (routed_bytes / (nlayers_moe * 896))) if fits > 0 else 0
        pct = 100.0 * n * (routed_bytes / (nlayers_moe * 896)) / stream if n > 0 else 0.0
        print("  %3d GB RAM -> %s for experts, about %6d of %d cached (%.1f%%)"
              % (ram, human(fits) if fits > 0 else "  DOES NOT FIT",
                 max(n, 0), nlayers_moe * 896, pct))
    return 0


if __name__ == "__main__":
    raise SystemExit(main())

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…