Skip to content

Commit

Permalink
fix: Adjust lines in snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasjng committed Jan 20, 2025
1 parent 90650e8 commit 1461984
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions docs/tutorials/huggingface.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,8 @@ We also use `nnbench.parametrize` to get the per-class metrics.
As the parametrization method needs the same arguments for each benchmark, we use Python's builtin `functools.partial` to fill the arguments.

```python
--8<-- "examples/huggingface/benchmark.py:131:139"
--8<-- "examples/huggingface/benchmark.py:63:67"
```

!!! Tip
In this parametrization, the model path is hardcoded to "dslim/distilbert-NER" on the HuggingFace hub.
When benchmarking other models, be sure to change this path to the actual model you want to benchmark.

After this, the benchmarking code is actually very simple, as in most of the other examples.
You find it in the nnbench repository in `examples/huggingface/runner.py`.

0 comments on commit 1461984

Please sign in to comment.