234 karma · joined March 25, 2015
Kudos on a great game! If you ever expand or open source this, let me know. The mechanics and design are great and could really blossom into something fun and expansive (especially if users could submit levels).
I challenge someone to beat it!
Model: https://huggingface.co/microsoft/Florence-2-large
Demo space: https://huggingface.co/spaces/gokaygokay/Florence-2
It’s also worth taking into consideration damper pedal velocity changes. When you go from “off” (velocity 0) to fully “on” and depressed (velocity 127), a lot of intermediate values will get fired off at high frequency.
Ultimately though you are right; it’s not enough frequency of information to overload SQLite (or a file system), probably by several orders of magnitude.
I was debating what storage layer to use and decided to try SQLite because of its speed claims — essentially a single table where each row is a MIDI event from the piano (note on, note off, control pedal, velocity, timestamp). No transactions, just raw inserts on every possible event. It so far has worked beautifully: it’s performant AND I can do fun analysis later on, e.g. to see what keys I hit more than others or what my average note velocity is.
I doubt they are running an OCR model, but if they actually were it would likely be an in-house one trained with more modern techniques.
[1] https://pytorch.org/docs/stable/generated/torch.nn.Module.ht...
Going through extra steps to learn something through primary sources and valuing being uncomfortable at times are important for my evolution as a programmer.
The tool is currently a Python CLI you pass files (text/PDF documents) into and it embeds them and launches a web UI. Embeddings are saved by file hash so files are only processed once and subsequent calls are instant. For a future direction, I am working on a native desktop app rewrite in Flutter and porting the project to use entirely C API-compatible libraries (which is a fun challenge when so many existing frameworks depend on Python). This will ideally make the tool easy for anyone to download and install and even opens up the possibility of mobile ports.
I’m excited to hear any comments or feedback! I’d love to know how it meets your needs and/or what features would make your lives easier.
I'm saying more that if the compression algorithm is benchmarking against "Alice in Wonderland" and has consumed the entirety of "Alice in Wonderland" in training the LLM (along with popular paragraphs and sentences quoted elsewhere), then it might do particularly well at reciting lines from that book and thus be able to compress it extremely well. I'd be more interested in seeing the compression algorithm's performance on new or unreleased works that would have no way of being training data.
As an extreme hypothetical, I could make a compression algorithm that is a table mapping an ID to an entire book and fill it with all the popular works. "Alice in Wonderland" would be replaced with a single short identifier string and achieve a ~0.001% compression ratio. An unseen work would be replaced with an <unknown> ID followed by the entire work and be slightly bigger. Then, I benchmark only the popular works and show insanely impressive results!
I have no doubt the LLM compressor would do really well on unseen works based on what you said above, but it's not a fair look at its performance to run it on works it may have been explicitly trained on.
[1] https://twitter.com/dylfreed/status/1651572024488218627
[2] https://xenova.github.io/transformers.js
[3] https://github.com/freedmand/semantra *(author of this tool)
[4] https://huggingface.co/sentence-transformers/all-MiniLM-L12-...
- https://www.washingtonpost.com/technology/interactive/2023/a...
- https://pile.eleuther.ai/ (data hosted by https://the-eye.eu/, where it's not too hard to find pirated, copyrighted books, e.g. https://the-eye.eu/public/Books/cdn.preterhuman.net/texts/li...)
It'd be cool to train text embeddings and musical chord embeddings (by analyzing song lyrics perhaps) and then build something to type in moods like "happy jaunty progression" and get a matching chord progression with a similar embedding (assuming you give it a large library of progressions). No generative AI would be needed :)
*speaking from experience. I built a web app at tapcompose.com (desktop only for now) that uses pure randomness for both chords and melody. Initially I used randomness for testing only and planned to substitute an AI model later — but I was delightfully satisfied with the results and kept it in
Semantra is a Python CLI that analyzes specified documents (text/pdf files), embeds them in chunks of text, and launches a local web server to interactively query them by semantic meaning. It is highly configurable and offers different embedding models, from Hugging Face transformers model (e.g. ones from SentenceTransformers) to OpenAI's embedding model (text-ada-embeddings-002).
The web app allows iteratively refining queries via tagging and adding/subtracting additional queries, allowing for very expressive and refined search experiences. It also presents "explanations" for search results by highlighting sub-regions within the results that most closely match the query.
Take it for a spin! `pipx install semantra`
---
Detailed instructions, tutorial, guide, and concept documentation at the repo: https://github.com/freedmand/semantra
Twitter thread with demo videos/content: https://twitter.com/dylfreed/status/1650268405881085952