Skip to content

Commit

Permalink
Fix EOT token from HF
Browse files Browse the repository at this point in the history
  • Loading branch information
RussellCanfield committed Jan 30, 2024
1 parent 4f2c21a commit 764ff3b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ The models above will require enough RAM to run them correctly, you should have

## Release Notes

### 0.1.6

Remove extraneous stop token from HuggingFace code completion.

### 0.1.5

The HuggingFace chat provider now supports Mixtral! This is a high performing AI that rivals GPT. If you are using our HuggingFace provider, try it out by setting the **"chatModel"** to **"mistralai/Mixtral-8x7B-Instruct-v0.1"**. This is now the default for HuggingFace.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "wing-man",
"displayName": "Wingman-AI",
"description": "Wingman - AI powered assistant to help you write your best code, we won't leave you hanging.",
"version": "0.1.5",
"version": "0.1.6",
"publisher": "WingMan",
"license": "MIT",
"author": {
Expand Down
3 changes: 2 additions & 1 deletion src/service/huggingface/huggingface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,8 @@ export class HuggingFace implements AIProvider {
const huggingFaceResponse =
(await response.json()) as HuggingFaceResponse;
return huggingFaceResponse.length > 0
? huggingFaceResponse[0].generated_text
? //temporary fix. Not sure why HF doesn't specify stop tokens
huggingFaceResponse[0].generated_text.replace("<EOT>", "")
: "";
}

Expand Down

0 comments on commit 764ff3b

Please sign in to comment.