Skip to content

Conversation

@junaidaslam2006
Copy link

Context :
This is a follow-up enhancement to my previous PR (the core MCP Bridge). It adds a layer of system intelligence to ensure users run the version of Gemma 3 best suited for their specific hardware.

Description :
This PR introduces a Hardware Intelligence Layer to the Gemma 3 MCP Gateway. While Gemma 3 offers a wide range of model sizes (1B to 27B), users often face "out of memory" errors or poor performance by selecting a model that exceeds their local hardware capabilities.

This update allows the gateway to "think" about the system it is running on, automatically recommending and defaulting to the optimal Gemma 3 variant based on detected system RAM.

Key Changes
system_utils.py: Added a diagnostic utility using psutil to detect system RAM and map it to recommended Gemma 3 variants (1B, 4B, 12B, or 27B).

config.py: Centralized model mapping and introduced support for the GEMMA_MODEL_SIZE environment variable for flexible deployment.

server.py: Integrated a "Startup Intelligence Report" that logs detected hardware and the selected model choice to the console on boot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant