Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a dora-llama-cpp-python node #816

Open
haixuanTao opened this issue Mar 7, 2025 · 4 comments
Open

Add a dora-llama-cpp-python node #816

haixuanTao opened this issue Mar 7, 2025 · 4 comments
Assignees
Labels
good first issue Good for newcomers python Python API

Comments

@haixuanTao
Copy link
Collaborator

In order to support more model without having to build additional nodes every time for each model. It could be great to have a dora-llama-cpp-python that is just https://github.com/dora-rs/dora/blob/main/node-hub/dora-qwen without the additional backend and with the model made configurable based on environment variables.

Ideally, this node would also support images, and historical data.

@haixuanTao haixuanTao added the good first issue Good for newcomers label Mar 7, 2025
@github-actions github-actions bot added the python Python API label Mar 7, 2025
@haixuanTao
Copy link
Collaborator Author

An example of a working pyproject.toml

[project]
name = "dora-qwen"
version = "0.3.10"
authors = [{ name = "Your Name", email = "[email protected]" }]
description = "dora-qwen"
license = { text = "MIT" }
readme = "README.md"
requires-python = ">=3.9"

dependencies = [
    "dora-rs >= 0.3.9",
    "torch == 2.4.0",
    "torchvision >= 0.19",
    "torchaudio >= 2.1.0",
    "opencv-python >= 4.1.1",
    "modelscope >= 1.18.1",
    "accelerate>=1.3.0",
    "transformers",
    "mlx-lm>=0.21.1; sys_platform == 'darwin'",
    "llama-cpp-python",
]

[tool.uv.sources]
llama-cpp-python = [
    { index = "llama_cpp_python_metal", marker = "sys_platform == 'darwin'" },
    { index = "llama_cpp_python_cu121", marker = "sys_platform == 'linux'" },
]

[dependency-groups]
dev = ["pytest >=8.1.1", "ruff >=0.9.1"]

[[tool.uv.index]]
name = "llama_cpp_python_cu121"
url = "https://abetlen.github.io/llama-cpp-python/whl/cu121"
explicit = true

[[tool.uv.index]]
name = "llama_cpp_python_metal"
url = "https://abetlen.github.io/llama-cpp-python/whl/metal"
explicit = true

[project.scripts]
dora-qwen = "dora_qwen.main:main"

Note that there is different index based on the backend

@ShashwatPatil
Copy link

please assign me

@haixuanTao
Copy link
Collaborator Author

Done :)

@ShashwatPatil
Copy link

I have made the pull request #850 ,
Please review it @haixuanTao

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers python Python API
Projects
None yet
Development

No branches or pull requests

2 participants