-
Notifications
You must be signed in to change notification settings - Fork 338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chat with onnxruntime-web fails when i deployed on my machine #438
Comments
@salimngit, it looks like you're encountering an error related to the presence of infinite values in the logits during the inference process with Here are a few steps you can take to troubleshoot and resolve this issue:
Here is an example of how you might add error handling to check for infinite values in logits: async function generateResponse(input) {
try {
const logits = await LLM.generate(input);
// Check for infinite values in logits
if (logits.some(value => !isFinite(value))) {
throw new Error("Found infinite value in logits");
}
const response = LLM.argmax(logits);
return response;
} catch (error) {
console.error("Error in generateResponse:", error);
// Handle the error appropriately
}
}
async function submitRequest(input) {
try {
const response = await generateResponse(input);
// Process the response
} catch (error) {
console.error("Error in submitRequest:", error);
// Handle the error appropriately
}
} Verify Local Setup:
Compare with Working Demo:
Debugging Tips:
By following these steps, you should be able to identify and resolve the issue with infinite values in the logits during model inference. |
Chat with onnxruntime-web example deployed with
"onnxruntime-web": "1.19.0-dev.20240509-69cfcba38a"
and associated wasm files from https://cdn.jsdelivr.net/npm/[email protected]/dist/
live demo https://guschmue.github.io/ort-webgpu/chat/index.html works just fine.
When i run locally, i receive the below error
The text was updated successfully, but these errors were encountered: