yokoli
CCConvex Community
•Created by yokoli on 10/18/2023 in #general
Alternatively would love to get help on
unfortunately the Bert models (including the ones you sent above) don't yet work on Ollama for local inference 😦 thats why I was looking into either a smaller LLM with embeddings OR transformer.js
21 replies
CCConvex Community
•Created by yokoli on 10/18/2023 in #general
Alternatively would love to get help on
my pitch: we can unlock tons of latent demand by telling people "ai town takes $0 to run". can start small with embeddings model, and devs can use this embedding model for ai town or any other ai apps they build
21 replies
CCConvex Community
•Created by yokoli on 10/18/2023 in #general
Alternatively would love to get help on
i imagine this could look like a convex function that only does
generateEmbedding(text, {
pooling: 'mean',
normalize: true,
21 replies
CCConvex Community
•Created by yokoli on 10/18/2023 in #general
Alternatively would love to get help on
ok another idea: what if convex hosts a small out of box embeddings model for people to call from their convex apps?
21 replies
CCConvex Community
•Created by yokoli on 10/18/2023 in #general
Alternatively would love to get help on
and yeah if we can support transformer.js it ll unlock a plethora of AI use cases
21 replies
CCConvex Community
•Created by yokoli on 10/18/2023 in #general
Alternatively would love to get help on
thanks so much for looking into this though @rkbh
21 replies
CCConvex Community
•Created by yokoli on 10/18/2023 in #general
Alternatively would love to get help on
ahhhhhh got it 😢
21 replies
CCConvex Community
•Created by yokoli on 10/18/2023 in #general
Alternatively would love to get help on
ah i see. and there's no way to tell it to pick it up by updating the vite.config?
21 replies
CCConvex Community
•Created by yokoli on 10/18/2023 in #general
Alternatively would love to get help on
Thanks for looking into this @rkbh ! fwiw @xenova/transformers unpacked size seems to be 45mb?
onnx
files are in total ~110mb. So it's just shy of the 250mb limit.
In this case, curious why using node
runtime wouldn't work out of box?
@sujayakar would be amazing if we can get this approach working so we don't have to bother you to extend the vector db dimensions 😆 😆 🙏
Thanks so much team!!!!21 replies
CCConvex Community
•Created by yokoli on 10/18/2023 in #general
Hey team is there a way to extend the
or maybe @sujayakar knows the answer here too? lmk! 🙏
5 replies
CCConvex Community
•Created by yokoli on 10/18/2023 in #general
Hey team is there a way to extend the
@Sam J Hey Sam! Let me know if you have thoughts here. SO close to get local only model working! ❤️
Alternatively this other approach could work too, but something about Convex runtime didn't load wasm... https://discord.com/channels/1019350475847499849/1019350478817079338/1164073505642532945
5 replies
CCConvex Community
•Created by yokoli on 10/18/2023 in #general
Alternatively would love to get help on
what i have:
import { pipeline } from '@xenova/transformers';
export async function fetchEmbeddingBatchLocal(
texts: string[],
): Promise<{ embeddings: number[][] }> {
const generateEmbedding = await pipeline('feature-extraction', 'Xenova/all-MiniLM-L6-v2');
// Generate a vector using Transformers.js
const outputs = await Promise.all(
texts.map((text) =>
generateEmbedding(text, {
pooling: 'mean',
normalize: true,
}),
),
);
// Extract the embedding output
const embeddings: number[][] = outputs.map((output) => Array.from(output.data));
return {
embeddings,
};
}
export async function fetchEmbeddingLocal(text: string) {
const { embeddings } = await fetchEmbeddingBatchLocal([text]);
return { embedding: embeddings[0] };
}
Getting "Uncaught Error: no available backend found. ERR: [wasm] TypeError: (0 , i.cpus) is not a function"21 replies
CCConvex Community
•Created by yokoli on 10/13/2023 in #general
NoImportModuleInSchema
Ohhh thanks so much for this!!! let me do some refactoring. Appreciate it 🙏 🙏 ❤️ @sshader
3 replies
CCConvex Community
•Created by yokoli on 10/13/2023 in #general
NoImportModuleInSchema
thank you @ian !!! starting a thread to preserve context if easier.
So I got this error when modifying the memory.ts in ai-town. What I did was instead of calling
chatCompletion
, i wrote a ollamaChatCompletion
that uses Langchain to call ollama.
I didn't modify anything on schema.ts so that's why I was super confused. Would appreciate any pointers!3 replies
CCConvex Community
•Created by yokoli on 3/6/2023 in #general
No inputs found
oh this worked! I just added a random .ts file under the /convex directory 👍 thank you!
4 replies