Skip to content

Commit 453d825

Browse files
committed
Add ci workflow to auto-generate api inference doc
1 parent 68155a0 commit 453d825

File tree

4 files changed

+68
-8
lines changed

4 files changed

+68
-8
lines changed
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Update API Inference Documentation
2+
3+
on:
4+
workflow_dispatch:
5+
# push:
6+
# branches:
7+
# - regenerate-api-inference-docs
8+
9+
concurrency:
10+
group: api_inference_generate_documentation
11+
cancel-in-progress: true
12+
13+
jobs:
14+
pull_request:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout repo
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Node
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: "20"
24+
25+
- name: Install pnpm
26+
uses: pnpm/action-setup@v4
27+
with:
28+
package_json_file: ./hub-docs/scripts/api-inference/package.json
29+
30+
- name: Install dependencies
31+
run: pnpm install
32+
working-directory: ./hub-docs/scripts/api-inference
33+
34+
- name: Generate API inference documentation
35+
run: pnpm run generate
36+
working-directory: ./hub-docs/scripts/api-inference
37+
38+
- name: Check changes
39+
run: git status
40+
working-directory: ./hub-docs
41+
42+
- name: Create Pull Request
43+
uses: peter-evans/create-pull-request@v7
44+
with:
45+
path: ./hub-docs
46+
token: ${{ secrets.GITHUB_TOKEN }}
47+
commit-message: Update API inference documentation (automated)
48+
author: ${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com>
49+
branch: update-api-inference-docs-automated-pr
50+
delete-branch: true
51+
title: "[Bot] Update API inference documentation"
52+
body: |
53+
This PR automatically regenerates the API inference documentation by running:
54+
```sh
55+
cd scripts/api-inference
56+
pnpm run generate
57+
```
58+
59+
This PR was automatically created by the [Update API Inference Documentation workflow](https://github.com/huggingface/hub-docs/blob/main/.github/workflows/api_inference_generate_documentation.yml).
60+
61+
Please review the changes before merging.
62+
reviewers: |
63+
Wauplin
64+
hanouticelina

docs/api-inference/tasks/chat-completion.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,12 @@ This is a subtask of [`text-generation`](https://huggingface.co/docs/api-inferen
2424
- [google/gemma-2-2b-it](https://huggingface.co/google/gemma-2-2b-it): A text-generation model trained to follow instructions.
2525
- [meta-llama/Meta-Llama-3.1-8B-Instruct](https://huggingface.co/meta-llama/Meta-Llama-3.1-8B-Instruct): Very powerful text generation model trained to follow instructions.
2626
- [microsoft/Phi-3-mini-4k-instruct](https://huggingface.co/microsoft/Phi-3-mini-4k-instruct): Small yet powerful text generation model.
27-
- [HuggingFaceH4/starchat2-15b-v0.1](https://huggingface.co/HuggingFaceH4/starchat2-15b-v0.1): Strong coding assistant model.
28-
- [mistralai/Mistral-Nemo-Instruct-2407](https://huggingface.co/mistralai/Mistral-Nemo-Instruct-2407): Very strong open-source large language model.
27+
- [Qwen/Qwen2.5-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct): Strong text generation model to follow instructions.
2928

3029
#### Conversational Vision-Language Models (VLMs)
3130

3231
- [meta-llama/Llama-3.2-11B-Vision-Instruct](https://huggingface.co/meta-llama/Llama-3.2-11B-Vision-Instruct): Powerful vision language model with great visual understanding and reasoning capabilities.
33-
- [microsoft/Phi-3.5-vision-instruct](https://huggingface.co/microsoft/Phi-3.5-vision-instruct): Strong image-text-to-text model.
32+
- [Qwen/Qwen2-VL-7B-Instruct](https://huggingface.co/Qwen/Qwen2-VL-7B-Instruct): Strong image-text-to-text model.
3433

3534
### API Playground
3635

docs/api-inference/tasks/image-text-to-text.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ For more details about the `image-text-to-text` task, check out its [dedicated p
2525
### Recommended models
2626

2727
- [meta-llama/Llama-3.2-11B-Vision-Instruct](https://huggingface.co/meta-llama/Llama-3.2-11B-Vision-Instruct): Powerful vision language model with great visual understanding and reasoning capabilities.
28-
- [HuggingFaceM4/idefics2-8b-chatty](https://huggingface.co/HuggingFaceM4/idefics2-8b-chatty): Cutting-edge conversational vision language model that can take multiple image inputs.
29-
- [microsoft/Phi-3.5-vision-instruct](https://huggingface.co/microsoft/Phi-3.5-vision-instruct): Strong image-text-to-text model.
28+
- [Qwen/Qwen2-VL-7B-Instruct](https://huggingface.co/Qwen/Qwen2-VL-7B-Instruct): Strong image-text-to-text model.
3029

3130
Explore all available models and find the one that suits you best [here](https://huggingface.co/models?inference=warm&pipeline_tag=image-text-to-text&sort=trending).
3231

docs/api-inference/tasks/text-generation.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,9 @@ For more details about the `text-generation` task, check out its [dedicated page
2727
### Recommended models
2828

2929
- [google/gemma-2-2b-it](https://huggingface.co/google/gemma-2-2b-it): A text-generation model trained to follow instructions.
30-
- [bigcode/starcoder](https://huggingface.co/bigcode/starcoder): A code generation model that can generate code in 80+ languages.
3130
- [meta-llama/Meta-Llama-3.1-8B-Instruct](https://huggingface.co/meta-llama/Meta-Llama-3.1-8B-Instruct): Very powerful text generation model trained to follow instructions.
3231
- [microsoft/Phi-3-mini-4k-instruct](https://huggingface.co/microsoft/Phi-3-mini-4k-instruct): Small yet powerful text generation model.
33-
- [HuggingFaceH4/starchat2-15b-v0.1](https://huggingface.co/HuggingFaceH4/starchat2-15b-v0.1): Strong coding assistant model.
34-
- [mistralai/Mistral-Nemo-Instruct-2407](https://huggingface.co/mistralai/Mistral-Nemo-Instruct-2407): Very strong open-source large language model.
32+
- [Qwen/Qwen2.5-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct): Strong text generation model to follow instructions.
3533

3634
Explore all available models and find the one that suits you best [here](https://huggingface.co/models?inference=warm&pipeline_tag=text-generation&sort=trending).
3735

0 commit comments

Comments
 (0)