generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 9
/
action.yml
71 lines (71 loc) · 2.81 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: 'LLM Code Review'
description: 'A container GitHub Action to review a pull request by HuggingFace LLM Model.'
author: 'Louis Le (luiyen)'
inputs:
githubToken:
description: 'Github token to access the repo'
required: true
apiKey:
description: 'Huggingface access token from [https://huggingface.co/settings/tokens](https://huggingface.co/settings/tokens)'
required: true
githubRepository:
description: "The GitHub repository to use for the action"
required: true
default: "${{ github.repository }}"
githubPullRequestNumber:
description: "The GitHub pull request number to use for the action"
required: true
default: "${{ github.event.pull_request.number }}"
gitCommitHash:
description: "The GitHub commit hash to use for the action"
required: true
default: "${{ github.event.pull_request.head.sha }}"
repoId:
description: "LLM model"
required: true
default: "meta-llama/Llama-2-7b-chat-hf"
maxNewTokens:
description: "The amount of new tokens to be generated, this does not include the input length it is a estimate of the size of generated text you want. Each new tokens slows down the request, so look for balance between response times and length of text generated."
required: false
default: "1024"
temperature:
description: "The temperature of the sampling operation. 1 means regular sampling, 0 means always take the highest score, 100.0 is getting closer to uniform probability."
required: false
default: "0.2"
topK:
description: "Integer to define the top tokens considered within the sample operation to create new text"
required: false
default: "50"
topP:
description: "Float to define the tokens that are within the sample operation of text generation. Add tokens in the sample for more probable to least probable until the sum of the probabilities is greater than top_p."
required: false
default: "0.95"
pullRequestDiff:
description: "Pull request diff"
required: true
pullRequestChunkSize:
description: "Pull request chunk size"
required: false
default: "3500"
logLevel:
description: "Log level"
required: false
default: "INFO"
runs:
using: docker
image: Dockerfile
env:
API_KEY: ${{ inputs.apiKey }}
GITHUB_TOKEN: ${{ inputs.githubToken }}
GITHUB_REPOSITORY: ${{ inputs.githubRepository }}
GITHUB_PULL_REQUEST_NUMBER: ${{ inputs.githubPullRequestNumber }}
GIT_COMMIT_HASH: ${{ inputs.gitCommitHash }}
args:
- "--repo-id=${{ inputs.repoId }}"
- "--temperature=${{ inputs.temperature }}"
- "--max-new-tokens=${{ inputs.maxNewTokens }}"
- "--top-p=${{ inputs.topP }}"
- "--top-k=${{ inputs.topK }}"
- "--diff-chunk-size=${{ inputs.pullRequestChunkSize }}"
- "--diff=${{ inputs.pullRequestDiff }}"
- "--log-level=${{ inputs.logLevel }}"