
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
The default model is Flag Embedding, which is top of the MTEB leaderboard.
To install the FastEmbed library, npm works:
npm install fastembed
import { EmbeddingModel, FlagEmbedding } from "fastembed";
// For CommonJS
// const { EmbeddingModel, FlagEmbedding } = require("fastembed)
const embeddingModel = await FlagEmbedding.init({
model: EmbeddingModel.BGEBaseEN
});
let documents = [
"passage: Hello, World!",
"query: Hello, World!",
"passage: This is an example passage.",
// You can leave out the prefix but it's recommended
"fastembed-js is licensed under MIT"
];
const embeddings = embeddingModel.embed(documents, 2); //Optional batch size. Defaults to 256
for await (const batch of embeddings) {
// batch is list of Float32 embeddings(number[][]) with length 2
console.log(batch);
}
const embeddings = embeddingModel.passageEmbed(listOfLongTexts, 10); //Optional batch size. Defaults to 256
for await (const batch of embeddings) {
// batch is list of Float32 passage embeddings(number[][]) with length 10
console.log(batch);
}
const queryEmbeddings: number[] = await embeddingModel.queryEmbed(userQuery);
console.log(queryEmbeddings)
It's important we justify the "fast" in FastEmbed. FastEmbed is fast because:
MIT © 2023
FAQs
NodeJS implementation of @Qdrant/fastembed
The npm package fastembed receives a total of 48,262 weekly downloads. As such, fastembed popularity was classified as popular.
We found that fastembed demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.