diff --git a/packages/widgets/src/lib/components/InferenceWidget/widgets/ConversationalWidget/ConversationalWidget.svelte b/packages/widgets/src/lib/components/InferenceWidget/widgets/ConversationalWidget/ConversationalWidget.svelte index 74a8eaa24e..5addaf94a6 100644 --- a/packages/widgets/src/lib/components/InferenceWidget/widgets/ConversationalWidget/ConversationalWidget.svelte +++ b/packages/widgets/src/lib/components/InferenceWidget/widgets/ConversationalWidget/ConversationalWidget.svelte @@ -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); diff --git a/packages/widgets/src/routes/+page.svelte b/packages/widgets/src/routes/+page.svelte index 80a7a43489..ed3a929be5 100644 --- a/packages/widgets/src/routes/+page.svelte +++ b/packages/widgets/src/routes/+page.svelte @@ -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: "", + 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: "", + }, + }, + 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",