This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Experiment to load the ONNX port of EmbeddingGemma with Hugot. | |
| // See: https://huggingface.co/onnx-community/embeddinggemma-300m-ONNX | |
| // which this script ports from the Python/Transformers.js equivalent. | |
| package main | |
| import ( | |
| "context" | |
| "fmt" | |
| "log" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """ | |
| Unmangles mojibake from Facebook's "Download Your Information" [1] site and writes | |
| to stdout or a given file. Input can either be a JSON file or a simple text | |
| file. Data can be encoded in either ASCII [2] or UTF-8 (for some end uses, | |
| showing things like emoji!). You almost always want UTF-8, though. | |
| The problem of Facebook DYI mojikbake was noted in this StackOverflow thread, | |
| which has other suggestions on how to handle this problem: |