Skip to content

fix: add Metal JIT warmup, cache inspect.signature, and add metal health label#665

Open
neuron-tech-ai wants to merge 1 commit into
jamiepine:mainfrom
neuron-tech-ai:fix/tts-performance
Open

fix: add Metal JIT warmup, cache inspect.signature, and add metal health label#665
neuron-tech-ai wants to merge 1 commit into
jamiepine:mainfrom
neuron-tech-ai:fix/tts-performance

Conversation

@neuron-tech-ai
Copy link
Copy Markdown

Three small performance fixes for Metal (Apple Silicon) TTS:

  1. Metal JIT warmup at startup — Metal compiles shaders JIT on first use, causing a multi-second stall on the first generation. Warming up at startup moves this cost to load time where it's expected, not to the first generation where it looks like a hang.

  2. Cache inspect.signature() — this was being called on every single TTS generation to introspect the model's forward() signature. Caching the result eliminates the repeated reflection overhead.

  3. Add metal health label — the /health endpoint reported backend type but didn't distinguish metal from other backends, making it harder to confirm Metal acceleration is active.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 14, 2026

Warning

Rate limit exceeded

@neuron-tech-ai has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 5 minutes and 24 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c91205d4-359d-4608-8332-2403c620d3d6

📥 Commits

Reviewing files that changed from the base of the PR and between b35b909 and 7984cd4.

📒 Files selected for processing (2)
  • backend/backends/mlx_backend.py
  • backend/routes/health.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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