Not fully meade.
Browse files- .gitignore +1 -0
- package.json +1 -1
.gitignore
CHANGED
|
@@ -1 +1,2 @@
|
|
| 1 |
/node_modules
|
|
|
|
|
|
| 1 |
/node_modules
|
| 2 |
+
/20k-models.json
|
package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
{
|
| 2 |
"name": "localm",
|
| 3 |
"version": "1.1.35",
|
| 4 |
-
"description": "Chat application",
|
| 5 |
"scripts": {
|
| 6 |
"build": "esbuild src/index.js --target=es6 --bundle --sourcemap --outfile=./index.js --format=iife --external:fs --external:path --external:child_process --external:ws --external:katex/dist/katex.min.css",
|
| 7 |
"start": "npm run build -- --watch --serve=0.0.0.0:8812 --servedir=. --serve-fallback=index.html",
|
|
|
|
| 1 |
{
|
| 2 |
"name": "localm",
|
| 3 |
"version": "1.1.35",
|
| 4 |
+
"description": "Chat application https://tty.wtf/#/Models//%60%60%60/const+xen+=+'Xenova%2Fllama2.c-stories15M';/const+lots+=+(await+Promise.all(%5B1,+2,+3,+4,+5,+6,+7,+8,+9,+10,+11,+12,+13,+14,+15,+16,+17,+18,+19,+20%5D.map(i+=%3E+fetch(/++'https:%2F%2Fhuggingface.co%2Fapi%2Fmodels%3Ffull=true%26limit=1000%26offset='+%2B+i+*+1000).then(x+=%3E+x.json())))).reduce((all,+arr)+=%3E+all.concat(arr));/%60%60%60////%60%60%60/const+tagFiltered+=+lots.filter(mod+=%3E+%2Ftransformers.js%2Fi.test(mod.tags.join('+')));/%60%60%60////%60%60%60/const+libFilter+=+await+fetch('https:%2F%2Fhuggingface.co%2Fapi%2Fmodels%3Ffull=true%26limit=1000%26gated=false%26library=transformers.js').then(x=%3Ex.json())/%60%60%60////%60%60%60/libFilter.filter(mod+=%3E+%2Ftransformers.js%2Fi.test(mod.tags.join('+')));/%60%60%60//////%60%60%60/++const+dataStr+=+'%5B%5Cn'+%2B+lots.map(entry+=%3E+JSON.stringify(entry)).join(',%5Cn')+%2B+'%5Cn%5D';/++const+blob+=+new+Blob(%5BdataStr%5D,+%7Btype:+'application%2Fjson'%7D);/++const+url+=+URL.createObjectURL(blob);/const+a+=+document.createElement('a');/a.href+=+url;/a.textContent+=+'Lots.json';/a.download+=+'lots.json';/a;/%60%60%60////%60%60%60/const+probeHuggingFaceModel+=+async+function+probeHuggingFaceModel(mod)+%7B/++const+baseUrl+=+%60https:%2F%2Fhuggingface.co%2F$%7Bmod.id%7D%2Fresolve%2Fmain%2F%60;/++const+essentialFiles+=+%5B/++++'config.json',/%2F%2F++++'model.onnx',/%2F%2F++++'model_quantized.onnx',/++++'tokenizer.json',/++++'tokenizer_config.json'/++%5D;//++let+withFiles+=+%7B/++++count:+0,/++++files:+%7B%7D,/++++...mod/++%7D;//++for+(const+file+of+essentialFiles)+%7B/++++const+fileUrl+=+%60$%7BbaseUrl%7D$%7Bfile%7D%60;/++++try+%7B/++++++const+response+=+await+fetch(/++++++++fileUrl,/++++++++%2F%2F%7B+method:+'HEAD'+%7D/++++++);/++++++if(response.ok)+%7B/++++++++withFiles.count%2B%2B;/++++++++withFiles.files%5Bfile%5D+=+true;/++++++%7D+else+%7B/++++++++withFiles.files%5Bfile%5D=+false;/++++++%7D/++++%7D+catch(error)+%7B/++++++withFiles.files%5Bfile%5D+=+error.message;/++++%7D/++%7D//++return+withFiles;/%7D//const+probeChecked+=+await+Promise.all(/++tagFiltered.map(mod+=%3E+probeHuggingFaceModel(mod)));//%60%60%60//",
|
| 5 |
"scripts": {
|
| 6 |
"build": "esbuild src/index.js --target=es6 --bundle --sourcemap --outfile=./index.js --format=iife --external:fs --external:path --external:child_process --external:ws --external:katex/dist/katex.min.css",
|
| 7 |
"start": "npm run build -- --watch --serve=0.0.0.0:8812 --servedir=. --serve-fallback=index.html",
|