🔧 Change separator token to </s> (#127)
Browse filesCo-authored-by: OlivierDehaene <Olivier.dehaene@gmail.com>
Files changed (3)
11 unmodified lines1213141516171811 unmodified linesPUBLIC_DISABLE_INTRO_TILES=falsePUBLIC_USER_MESSAGE_TOKEN=<|prompter|>PUBLIC_ASSISTANT_MESSAGE_TOKEN=<|assistant|>PUBLIC_SEP_TOKEN=<|endoftext|>PUBLIC_PREPROMPT="Below are a series of dialogues between various people and an AI assistant. The AI tries to be helpful, polite, honest, sophisticated, emotionally aware, and humble-but-knowledgeable. The assistant is happy to help with almost anything, and will do its best to understand exactly what is needed. It also tries to avoid giving false or misleading information, and it caveats when it isn't entirely sure about the right answer. That said, the assistant is practical and really does its best, and doesn't let caution get too much in the way of being useful."# [{"endpoint": "https://api-inference.huggingface.co/models/...", authorization: "Bearer hf_<token>", weight: 1}] to load balance11 unmodified lines1213141516171811 unmodified linesPUBLIC_DISABLE_INTRO_TILES=falsePUBLIC_USER_MESSAGE_TOKEN=<|prompter|>PUBLIC_ASSISTANT_MESSAGE_TOKEN=<|assistant|>PUBLIC_SEP_TOKEN=</s>PUBLIC_PREPROMPT="Below are a series of dialogues between various people and an AI assistant. The AI tries to be helpful, polite, honest, sophisticated, emotionally aware, and humble-but-knowledgeable. The assistant is happy to help with almost anything, and will do its best to understand exactly what is needed. It also tries to avoid giving false or misleading information, and it caveats when it isn't entirely sure about the right answer. That said, the assistant is practical and really does its best, and doesn't let caution get too much in the way of being useful."# [{"endpoint": "https://api-inference.huggingface.co/models/...", authorization: "Bearer hf_<token>", weight: 1}] to load balance
5 unmodified lines678910111230 unmodified lines434445464748495 unmodified linesimport { textGenerationStream } from "@huggingface/inference";import { invalidate } from "$app/navigation";import { base } from "$app/paths";import { PUBLIC_MAX_INPUT_TOKENS } from "$env/static/public";import { shareConversation } from "$lib/shareConversation";import { UrlDependency } from "$lib/types/UrlDependency";import { error } from "$lib/stores/errors";30 unmodified linestruncate: parseInt(PUBLIC_MAX_INPUT_TOKENS),watermark: false,max_new_tokens: 1024,stop: ["<|endoftext|>"],return_full_text: false,},},5 unmodified lines678910111230 unmodified lines434445464748495 unmodified linesimport { textGenerationStream } from "@huggingface/inference";import { invalidate } from "$app/navigation";import { base } from "$app/paths";import { PUBLIC_MAX_INPUT_TOKENS, PUBLIC_SEP_TOKEN } from "$env/static/public";import { shareConversation } from "$lib/shareConversation";import { UrlDependency } from "$lib/types/UrlDependency";import { error } from "$lib/stores/errors";30 unmodified linestruncate: parseInt(PUBLIC_MAX_INPUT_TOKENS),watermark: false,max_new_tokens: 1024,stop: [PUBLIC_SEP_TOKEN],return_full_text: false,},},
123429 unmodified lines34353637383940import { PUBLIC_MAX_INPUT_TOKENS } from "$env/static/public";import { buildPrompt } from "$lib/buildPrompt";import { collections } from "$lib/server/database.js";import { modelEndpoint } from "$lib/server/modelEndpoint.js";29 unmodified lineswatermark: false,max_new_tokens: 1024,truncate: parseInt(PUBLIC_MAX_INPUT_TOKENS),stop: ["<|endoftext|>"],return_full_text: false,};123429 unmodified lines34353637383940import { PUBLIC_MAX_INPUT_TOKENS, PUBLIC_SEP_TOKEN } from "$env/static/public";import { buildPrompt } from "$lib/buildPrompt";import { collections } from "$lib/server/database.js";import { modelEndpoint } from "$lib/server/modelEndpoint.js";29 unmodified lineswatermark: false,max_new_tokens: 1024,truncate: parseInt(PUBLIC_MAX_INPUT_TOKENS),stop: [PUBLIC_SEP_TOKEN],return_full_text: false,};
.env+1-1
src/routes/conversation/[id]/+page.svelte+2-2
src/routes/conversation/[id]/summarize/+server.ts+2-2