What is Nostr?
- /
npub122c…hv33
2024-02-02 04:40:49

- on Nostr: #llama #inference in browser #wasm added input prompt ...

#llama #inference in browser #wasm
added input prompt
data:text/html;base64,PCFET0NUWVBFIGh0bWw+CjxodG1sPgo8aGVhZD4KICA8dGl0bGU+UnVuIExsYW1hIDIgbW9kZWxzIGluIHRoZSBicm93c2VyIHdpdGggV2ViQXNzZW1ibHk8L3RpdGxlPgo8L2hlYWQ+Cjxib2R5PgogIDxmb3JtIGlkPSJmb3JtIiBhY3Rpb249IiMiPgogICAgPGxhYmVsPnByb21wdDwvbGFiZWw+CiAgICA8aW5wdXQgaWQ9InByb21wdCIgdHlwZT0idGV4dCIvPgogICAgPGJ1dHRvbiBjbGFzcz0iYnV0dG9uIiBpZD0idG9nZ2xlLWluZmVyZW5jZSI+UnVuIGluZmVyZW5jZTwvYnV0dG9uPgogIDwvZm9ybT4KICA8cCBpZD0ib3V0cHV0Ij48L3A+CiAgPHNjcmlwdCB0eXBlPSJtb2R1bGUiPgogIGNvbnN0IHdvcmtlcl9zdHIgPSBgCiAgaW1wb3J0IHsgV0FTSSwgV0FTSUNvbnRleHQgfSBmcm9tICJodHRwczovL2Nkbi5za3lwYWNrLmRldi9AcnVubm8vd2FzaSI7CiAgCiAgc2VsZi5hZGRFdmVudExpc3RlbmVyKCdtZXNzYWdlJywgZnVuY3Rpb24gKGV2ZW50KSB7CiAgICBjb25zb2xlLmxvZygicHJvbXB0IiwgZXZlbnQuZGF0YS5wcm9tcHQpCgogICAgUHJvbWlzZS5hbGwoCiAgICAgIFsKICAgICAgICBmZXRjaCgiaHR0cHM6Ly9odWdnaW5nZmFjZS5jby9rYXJwYXRoeS90aW55bGxhbWFzL3Jlc29sdmUvbWFpbi9zdG9yaWVzMjYwSy9zdG9yaWVzMjYwSy5iaW4/ZG93bmxvYWQ9dHJ1ZSIpLnRoZW4ocmVzID0+IHJlcy5hcnJheUJ1ZmZlcigpKSwKICAgICAgICBmZXRjaCgiaHR0cHM6Ly9odWdnaW5nZmFjZS5jby9rYXJwYXRoeS90aW55bGxhbWFzL3Jlc29sdmUvbWFpbi9zdG9yaWVzMjYwSy90b2s1MTIuYmluIikudGhlbihyZXMgPT4gcmVzLmFycmF5QnVmZmVyKCkpCiAgICAgIF0sCiAgICApLnRoZW4oYXN5bmMgZGF0YSA9PiB7CiAgICAgIGxldCBtb2RlbCA9IGRhdGFbMF07CiAgICAgIGxldCB0b2tlbml6ZXIgPSBkYXRhWzFdOwoKICAgICAgY29uc3QgY29udGV4dCA9IG5ldyBXQVNJQ29udGV4dCh7CiAgICAgICAgYXJnczogWyIiLCAibW9kZWwuYmluIiwgIi10IiwgIjAuOSIsICItaSIsIGV2ZW50LmRhdGEucHJvbXB0XSwKICAgICAgICBzdGRvdXQ6IChkYXRhKSA9PiBzZWxmLnBvc3RNZXNzYWdlKHsgZGF0YSB9KSwKICAgICAgICBzdGRlcnI6IChlcnIpID0+IGNvbnNvbGUuZXJyb3IoInN0ZGVyciIsIGVyciksCiAgICAgICAgZnM6IHsKICAgICAgICAgICIvbW9kZWwuYmluIjogewogICAgICAgICAgICBwYXRoOiAiL21vZGVsLmJpbiIsCiAgICAgICAgICAgIHRpbWVzdGFtcHM6IHsKICAgICAgICAgICAgICBhY2Nlc3M6IG5ldyBEYXRlKCksCiAgICAgICAgICAgICAgY2hhbmdlOiBuZXcgRGF0ZSgpLAogICAgICAgICAgICAgIG1vZGlmaWNhdGlvbjogbmV3IERhdGUoKSwKICAgICAgICAgICAgfSwKICAgICAgICAgICAgbW9kZTogImJpbmFyeSIsCiAgICAgICAgICAgIGNvbnRlbnQ6IG5ldyBVaW50OEFycmF5KG1vZGVsKSwKICAgICAgICAgIH0sCiAgICAgICAgICAiL3Rva2VuaXplci5iaW4iOiB7CiAgICAgICAgICAgIHBhdGg6ICIvdG9rZW5pemVyLmJpbiIsCiAgICAgICAgICAgIHRpbWVzdGFtcHM6IHsKICAgICAgICAgICAgICBhY2Nlc3M6IG5ldyBEYXRlKCksCiAgICAgIC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BXb3JrZXIod29ya2VyX2Jsb2JfdXJsLCB7IHR5cGU6ICJtb2R1bGUiIH0pOwogICAgICB3b3JrZXIucG9zdE1lc3NhZ2UoewogICAgICAgIHByb21wdDogcHJvbXB0CiAgICAgIH0pOwogICAgICB3b3JrZXIuYWRkRXZlbnRMaXN0ZW5lcignbWVzc2FnZScsIGZ1bmN0aW9uIChldmVudCkgewogICAgICAgIGlmIChzdG9wVGltZW91dCAhPSBudWxsKSB7CiAgICAgICAgICBjbGVhclRpbWVvdXQoc3RvcFRpbWVvdXQpOwogICAgICAgIH0KCiAgICAgICAgY29uc3QgeyBkYXRhIH0gPSBldmVudC5kYXRhOwogICAgICAgIG91dHB1dC50ZXh0Q29udGVudCA9IGAke291dHB1dC50ZXh0Q29udGVudH0ke2RhdGF9YDsKCiAgICAgICAgc3RvcFRpbWVvdXQgPSBzZXRUaW1lb3V0KCgpID0+IHsKICAgICAgICAgIHJ1bm5pbmcgPSBmYWxzZTsKICAgICAgICAgIGJ1dHRvbi50ZXh0Q29udGVudCA9ICJSdW4gaW5mZXJlbmNlIjsKICAgICAgICB9LCA1MDApOwogICAgICB9KTsKCiAgICAgIHdvcmtlci5hZGRFdmVudExpc3RlbmVyKCJlcnJvciIsIGZ1bmN0aW9uIChlcnJvcikgewogICAgICAgIGNvbnNvbGUubG9nKCJFUlJPUjogIiwgZXJyb3IpOwogICAgICB9KTsKCiAgICAgIGJ1dHRvbi50ZXh0Q29udGVudCA9ICJTdG9wIGluZmVyZW5jZSI7CiAgICAgIHJ1bm5pbmcgPSB0cnVlOwogICAgfSBlbHNlIHsKICAgICAgaWYgKHdvcmtlciAhPSBudWxsKSB7CiAgICAgICAgd29ya2VyLnRlcm1pbmF0ZSgpOwogICAgICAgIHdvcmtlciA9IG51bGw7CiAgICAgIH0KCiAgICAgIGJ1dHRvbi50ZXh0Q29udGVudCA9ICJSdW4gaW5mZXJlbmNlIjsKICAgICAgcnVubmluZyA9IGZhbHNlOwogICAgfQogIH0pOwogIDwvc2NyaXB0Pgo8L2JvZHk+CjwvaHRtbD4K
Author Public Key
npub122ce3y27qw6c323r38hk8easz5l3uvxqusqvnmsjfv8sga42878ssyhv33