Show HN: Our command line tool to transpile AI Inference from Python to C++
github.com·4h·
Discuss: Hacker News
Preview
Report Post

Muna for Python

Run AI models anywhere.

Installing Muna

Muna is distributed on PyPi. This distribution contains both the Python client and the command line interface (CLI). Run the following command in terminal:

# Install Muna
$ pip install --upgrade muna

Note

Muna requires Python 3.11+

Transpiling a Python Function

Muna can transpile Python functions into C++, generating a self-contained header-only library that pulls all of its dependencies automatically (e.g. llama.cpp, mlx, CUDA). First, add the @compile decorator to your function:

from muna import compile

@compile()
def do_stuff():
...

Then use the Muna CLI to transpile to C++:

# Transpile the Python function to C++
$ muna transpile ...

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help