microsoft / microsoft/onnxruntime

[Documentation] Add examples to Rust bindings

Open
#14,852 5 comments 0 reactions 0 assignees View on GitHub
documentation model:transformer more info needed
Dominant language
C++
Stars
21.9k
Forks
4.2k
Avg merge
4d 11h
Merged PRs (30d)
184

Description

### Describe the documentation issue

Now that the Rust bindings for the ONNX runtime (https://github.com/microsoft/onnxruntime/pull/12606), it would be useful to have examples. I know there are a couple of files [like this one](https://github.com/microsoft/onnxruntime/blob/main/rust/onnxruntime/examples/sample.rs) but there are none for other models or other types of inference like for summarization.

Although I'm not very proficient in Rust, I've tried crafting a working example for summarization that is not quite right. My suspicion is that it is because the model I'm using (GPT-2) doesn't have the correct `vocab.json` and `merges.txt` files.

The full example with instructions for setup is here https://github.com/alfredodeza/rust-onnx-summarization

I'm happy to volunteer to help out and draft the wording and any additions if we can get at least the summarizer example working.

### Page / URL

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with rust/onnxruntime/examples/sample.rs and the linked rust-onnx-summarization example, including its setup instructions. Determine how the existing Rust binding example relates to the proposed summarization workflow, then document working examples for additional models or inference types, with setup guidance sufficient for users to run them.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation, machine-learning
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.