This project is a React + TypeScript + Vite application that calculates the maximum number of parameters that can fit in RAM for different quantization levels of large language models (LLMs).
- Calculate maximum parameters based on available RAM, OS usage, context window size, and quantization level
- Interactive UI built with React and TypeScript
- Fast development with Vite and Hot Module Replacement (HMR)
- Styling with Tailwind CSS
-
Clone the repository:
git clone https://github.com/RayFernando1337/LLM-Calc.git cd LLM-Calc
-
Install dependencies:
bun install
-
Start the development server:
bun run dev
-
Open your browser and navigate to
http://localhost:5173
(or the port specified in the console output).
To create a production build:
bun run build
The built files will be in the dist
directory.
Once the application is running, you can:
- Enter your available RAM in GB
- Estimate OS RAM usage in GB
- Set the context window size (number of tokens)
- Choose a quantization level (bits per parameter)
The app will calculate and display the maximum number of parameters your setup can handle in billions.
The calculation logic remains the same as in the previous version:
- Convert available RAM and OS overhead from GB to bytes
- Calculate memory required for the context window
- Calculate usable RAM by subtracting OS overhead and context window memory
- Convert quantization level from bits to bytes per parameter
- Calculate maximum number of parameters
- Convert result to billions of parameters for display
Contributions are welcome! Please feel free to submit a Pull Request.
This project was bootstrapped with Vite and uses React, TypeScript, and Tailwind CSS. It uses Bun as the JavaScript runtime and package manager.