Instantly share code, notes, and snippets.
-
-
Save fordnox/e592d0f68b543fd044be8e6d040863a0 to your computer and use it in GitHub Desktop.
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
| mkdir test-laya | |
| cd test-laya | |
| uv init | |
| uv add 'laya-coreml[demo]' | |
| hf download aac6fef/laya-multilingual-coreml-ane --local-dir models/snake | |
| uv run laya-coreml-snake --model models/snake |
testing https://github.com/mizorewww/laya-coreml
LAYA-CORE-ML.mov
Memory usage
Analysis of sampling python (pid 26208) every 1 millisecond
Process: python3.12 [26208]
Path: /Users/USER/*/python3.12
Load Address: 0x10017c000
Identifier: python3.12
Version: ???
Code Type: ARM64
Platform: macOS
Parent Process: uv [26207]
Target Type: live task (Roots Present)
Date/Time: 2026-09-20 23:05:12.300 +0300
Launch Time: 2026-09-20 23:03:49.632 +0300
OS Version: macOS 27.0 (26A428)
Report Version: 7
Analysis Tool: /usr/bin/sample
Physical footprint: 560.4M
Physical footprint (peak): 778.0M
Idle exit: untracked
Nice! I just wanted to see what Laya does and put it behind Cloudflare's typesafe/jev API:
curl https://laya.inference.zaitlabs.com/ai/run \ -H "Content-Type: application/json" \ -d '{ "state": "Help! My payouts have been failing for 3 days.", "questions": { "is_urgent": {"type": "noul", "instructions": "Does this convey urgency?"} } }'
{"answers":{"is_urgent":{"type":"noul","noul":0.7894}}}