huggingface / huggingface/candle

[Feature request] Graph capturing for ONNX and StableHLO

Open
#1,600 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
21k
Forks
1.8k
Avg merge
16h 42m
Merged PRs (30d)
25

Description

It would be useful if Candle could capture a graph representation an implemented model using procedural macros. This graph representation can then be used to export the model in the ONNX format so that models trained with Candle can be used with other machine learning frameworks.

It also would allow to transform the graph to StableHLO and then use e. g. IREE to optimize and execute the graph. This might be interesting because it gives access to all backends implemented in the chosen compiler (e.g. AMD's ROCm) and the optimized graph can potentially be faster.

Contributor guide

No contributing guide indexed for this repository

Research direction

No files, tests, or entry points are named. Start by scoping how procedural macros could capture implemented Candle models and how the resulting graph should be exported to ONNX or transformed to StableHLO for IREE; done requires an agreed design and support for both graph outputs.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers, machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.