Instructions to use ruddls030/haru-e5-small-int8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use ruddls030/haru-e5-small-int8 with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('feature-extraction', 'ruddls030/haru-e5-small-int8');
haru-e5-small-int8
HaruPet λ°μ€ν¬ν± ν«μ 'CPU μ μ© λν'(λ΄μ₯ λν λͺ¨λΈμ λͺ» μ°λ μ¬μ©μμ© λ΅ κ³ λ₯΄κΈ°)μ μ°λ λ¬Έμ₯ μλ² λ© λͺ¨λΈμ΄μμ. intfloat/multilingual-e5-smallμ ν루 λν μ§λ¬Έβλ΅ μμΌλ‘ νμΈνλνμ΄μ(MultipleNegativesRanking, 8μν). νμ΅ λ°μ΄ν°λ 곡κ°νμ§ μμμ.
onnx/model_quantized.onnx: int8 λμ μμν(μ±λλ³ uint8), 118MB. μ±μ΄ μ°λ νμΌμ΄μμ.onnx/model.onnx: fp32, 470MB- 384μ°¨μ, mean pooling ν μ κ·ν. μ
λ ₯ μμ
query:(μ§λ¬Έ),passage:(κΈ°μ΅Β·λ¬Έμ)λ₯Ό λΆμ¬μ.
import { pipeline } from "@huggingface/transformers";
const ext = await pipeline("feature-extraction", "ruddls030/haru-e5-small-int8", { dtype: "q8" });
const v = await ext(["query: μ€λ λ무 νΌκ³€ν΄"], { pooling: "mean", normalize: true });
νκ°
| λͺ¨λΈ | ν루 μ€μ μ§λ¬Έ R@1 | ν루 ν©μ± μ§λ¬Έ R@1 | Ko-StrategyQA nDCG@10 |
|---|---|---|---|
| multilingual-e5-small | 0.413 | 0.657 | 0.752 |
| KoSimCSE-roberta-multitask | 0.440 | 0.514 | 0.639 |
| μ΄ λͺ¨λΈ (fp32) | 0.593 | 0.714 | 0.715 |
| μ΄ λͺ¨λΈ int8 (onnxruntime-web WASM) | 0.587 | β | β |
CPU μ μ© λν λ¬Άμ (cpu-chat/)
ν루·루λΒ·λͺ¨λ¦¬Β·λ―Έλμ½ λ€ μΊλ¦ν°κ° μ΄ λͺ¨λΈ νλμ κ³΅μ© μ§λ¬Έ λͺ©λ‘μ κ°μ΄ μ¨μ. μ¬μ©μ λ§κ³Ό κ°μ₯ λΉμ·ν κ³΅μ© μ§λ¬Έμ κ³ λ₯΄κ³ , μ§κΈ μΊλ¦ν°μ λ΅μ λ³΄μ¬ μ€μ.
cpu-chat/questions.f16: κ³΅μ© μ§λ¬Έ 3,575κ°μ 벑ν°. 3,575Γ384 float16, little-endian, ν μμ = λ΅ μμ, μ κ·νλ¨. 2.7MBcpu-chat/answers.json:answers.{haru,luna,mori,minako}[i]= iλ²μ§Έ μ§λ¬Έμ λν λ΅,fallback.<μΊλ¦ν°>= λ묻λ λ§ 3κ°,threshold0.6. 1.6MB
const v = await ext(["query: " + msg], { pooling: "mean", normalize: true });
// questions.f16 μ κ° νκ³Ό λ΄μ β μ΅κ³ μ μ i
// μ μ >= threshold ? answers[char][i] : fallback[char] μ€ νλ
CPU(WASM, 1μ€λ λ)μμ λ΅ νλ κ³ λ₯΄λ λ° μ½ 16ms, ν¨μ¨ μ½μ΄λ§ μ°λ©΄ μ½ 106ms κ±Έλ €μ.
- Downloads last month
- 32
Model tree for ruddls030/haru-e5-small-int8
Base model
intfloat/multilingual-e5-small