Downloads · 30 days
18
25% of all-time downloads
sailesh27/unixcoder-base-onnx
unixcoder-base-onnx is a feature extraction model from sailesh27. Use it when you need embeddings to search or compare text. It is set up for transformers.js. The card lists the license as apache-2.0.
Converted by VibeAtlas - AI Context Optimization for Developers
Downloads · 30 days
18
25% of all-time downloads
All-time downloads
71
Public
Repo size
502 MB
Likes
0
Public
Click a slice to open those files.
.onnx502 MB · 99%
From the Hugging Face model README
Converted by VibeAtlas - AI Context Optimization for Developers
This is Microsoft's UniXcoder converted to ONNX format for use with Transformers.js in browser and Node.js environments.
UniXcoder understands code semantically, not just as text:
import { pipeline } from '@huggingface/transformers';
const embedder = await pipeline(
'feature-extraction',
'sailesh27/unixcoder-base-onnx'
);
const code = `function authenticate(user) {
return user.isValid && user.hasPermission;
}`;
const embedding = await embedder(code, {
pooling: 'mean',
normalize: true
});
console.log(embedding.dims); // [1, 768]
import { pipeline, cos_sim } from '@huggingface/transformers';
const embedder = await pipeline('feature-extraction', 'sailesh27/unixcoder-base-onnx');
// Index your code
const codeSnippets = [
'function login(user, pass) { ... }',
'function formatDate(date) { ... }',
'function validateEmail(email) { ... }'
];
const codeEmbeddings = await embedder(codeSnippets, { pooling: 'mean', normalize: true });
// Search with natural language
const query = 'user authentication';
const queryEmbedding = await embedder(query, { pooling: 'mean', normalize: true });
// Find most similar
const similarities = codeEmbeddings.tolist().map((emb, i) => ({
code: codeSnippets[i],
score: cos_sim(queryEmbedding.tolist()[0], emb)
}));
VibeAtlas is the reliability infrastructure for AI coding:
Links:
@misc{unixcoder-onnx-2025,
title={UniXcoder ONNX: Code Embeddings for JavaScript},
author={VibeAtlas Team},
year={2025},
publisher={Hugging Face},
url={https://huggingface.co/sailesh27/unixcoder-base-onnx}
}
@inproceedings{guo2022unixcoder,
title={UniXcoder: Unified Cross-Modal Pre-training for Code Representation},
author={Guo, Daya and Lu, Shuai and Duan, Nan and Wang, Yanlin and Zhou, Ming and Yin, Jian},
booktitle={ACL},
year={2022}
}
Apache 2.0 (same as original UniXcoder)