Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@
signal: abort?.signal,
use_cache: useCache || !$isLoggedIn,
wait_for_model: withModelLoading,
retry_on_error: false,
} satisfies Options;

tgiSupportedModels = await getTgiSupportedModels(apiUrl);
Expand Down
46 changes: 46 additions & 0 deletions packages/widgets/src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,52 @@
},
],
},
{
id: "microsoft/Phi-3-mini-128k-instruct",
pipeline_tag: "text-generation",
tags: ["conversational"],
inference: InferenceDisplayability.Yes,
config: {
architectures: ["Phi3ForCausalLM"],
model_type: "phi3",
tokenizer_config: {
bos_token: "<s>",
chat_template:
"{{ bos_token }}{% for message in messages %}{% if (message['role'] == 'user') %}{{'<|user|>' + '\n' + message['content'] + '<|end|>' + '\n' + '<|assistant|>' + '\n'}}{% elif (message['role'] == 'assistant') %}{{message['content'] + '<|end|>' + '\n'}}{% endif %}{% endfor %}",
eos_token: "<|endoftext|>",
pad_token: "<|endoftext|>",
unk_token: "<unk>",
},
},
widgetData: [
{ text: "This is a text-only example", example_title: "Text only" },
{
messages: [{ content: "Please exlain QCD in very few words", role: "user" }],
example_title: "Chat messages",
},
{
messages: [{ content: "Please exlain QCD in very few words", role: "user" }],
output: {
text: "QCD is the physics of strong force and small particles.",
},
example_title: "Chat messages with Output",
},
{
text: "Explain QCD in one short sentence.",
output: {
text: "QCD is the physics of strong force and small particles.",
},
example_title: "Text only with Output",
},
{
example_title: "Invalid example - unsupported role",
messages: [
{ role: "system", content: "This will fail because of the chat template" },
{ role: "user", content: "What's your favorite condiment?" },
],
},
],
},
{
id: "google/gemma-7b",
pipeline_tag: "text-generation",
Expand Down