You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are (currently) two points where user provided filtering is required:
Filtering plugins: which ones to load and which not to load.
Filtering model loaders: which one to use and which not to use. Here we can even expand the filtering to rating, and have the lib select the best rated model via a user function
If C++ was the only language we support, this would've been easy, and the only current implementation - callbacks. However supporting many other languages makes this hard and annoying. Callbacks and relevant types need to be exposed manually for every language. That's a lot of work that we would rather not do.
My first idea was to build a hacky in-memory sqlite database and just take a SQL query string to run in the database to filter. select x from t implied. Something like:
AcLocal.load_plugins(''' LOWER(name) LIKE '%cuda%' AND LOWER(name) LIKE '%llama%'''');
But that won't work with plugins as some filters are applied after the plugin is opened, and we don't want to open all. If we want ratings we would have to expose more: with selections, joins, possibly procedures... it's nasty. Plus we will have to embed sqlite.
So, my current idea is to instead create a simple embeddable language (with a direct AST interpreter) which does the filtering. Plus the syntax would be much nicer and user-friendlier than nasty SQL. Something like:
AcLocal.load_plugins(''' name matches "cuda" name matches "llama" version is 1.3.5''')
AcLocal.load_model(desc, ''' tags has any of "cuda", "vulkan" ops contains "chat" rating= 10 * tags contains "cuda" vendor is "Alpaca Core" license matches "mit"''')
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
There are (currently) two points where user provided filtering is required:
If C++ was the only language we support, this would've been easy, and the only current implementation - callbacks. However supporting many other languages makes this hard and annoying. Callbacks and relevant types need to be exposed manually for every language. That's a lot of work that we would rather not do.
My first idea was to build a hacky in-memory sqlite database and just take a SQL query string to run in the database to filter.
select x from t
implied. Something like:But that won't work with plugins as some filters are applied after the plugin is opened, and we don't want to open all. If we want ratings we would have to expose more:
with
selections, joins, possibly procedures... it's nasty. Plus we will have to embed sqlite.So, my current idea is to instead create a simple embeddable language (with a direct AST interpreter) which does the filtering. Plus the syntax would be much nicer and user-friendlier than nasty SQL. Something like:
Beta Was this translation helpful? Give feedback.
All reactions