Skip to content

Commit

Permalink
test multi stop tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
hahuyhoang411 committed Oct 29, 2024
1 parent a144e1d commit 6d3c67c
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/create-model-yml.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Cache Python packages
uses: actions/cache@v4
with:
Expand All @@ -66,6 +67,13 @@ jobs:
- name: Create model.yml
run: |
# Process stop tokens: split by comma and create YAML format
STOP_TOKENS_YAML=""
IFS=',' read -ra TOKENS <<< "${{ env.STOP_TOKENS }}"
for token in "${TOKENS[@]}"; do
STOP_TOKENS_YAML+=" - ${token}\n"
done
cat << EOF > model.yml
# BEGIN GENERAL GGUF METADATA
id: ${{ env.MODEL_NAME }}
Expand All @@ -78,7 +86,7 @@ jobs:
# BEGIN INFERENCE PARAMETERS
# BEGIN REQUIRED
stop:
- ${{ inputs.stop_tokens }}
${STOP_TOKENS_YAML}
# END REQUIRED
# BEGIN OPTIONAL
Expand Down Expand Up @@ -109,8 +117,8 @@ jobs:
# BEGIN MODEL LOAD PARAMETERS
# BEGIN REQUIRED
engine: ${{ inputs.engine }}
prompt_template: ${{ inputs.prompt_template }}
engine: ${{ env.ENGINE }}
prompt_template: ${{ env.PROMPT_TEMPLATE }}
ctx_len: 4096
ngl: 34
# END OPTIONAL
Expand Down

0 comments on commit 6d3c67c

Please sign in to comment.