bowang0911 commited on
Commit
ab95a3d
·
verified ·
1 Parent(s): 8f1c274

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +14 -2
README.md CHANGED
@@ -6,7 +6,7 @@ tags:
6
  - gguf
7
  - qwen3
8
  - bidirectional
9
- license: mit
10
  ---
11
 
12
  # pplx-embed-v1-0.6b GGUF (F16)
@@ -27,7 +27,19 @@ from llama_cpp import Llama, llama_cpp
27
  llm = Llama(model_path="pplx-embed-v1-0.6b-f16.gguf", embedding=True, pooling_type=1)
28
  llama_cpp.llama_set_causal_attn(llm._ctx.ctx, False)
29
 
30
- embedding = llm.embed("your text here")
 
 
 
 
 
 
 
 
 
 
 
 
31
  ```
32
 
33
  CLI:
 
6
  - gguf
7
  - qwen3
8
  - bidirectional
9
+ license: apache-2.0
10
  ---
11
 
12
  # pplx-embed-v1-0.6b GGUF (F16)
 
27
  llm = Llama(model_path="pplx-embed-v1-0.6b-f16.gguf", embedding=True, pooling_type=1)
28
  llama_cpp.llama_set_causal_attn(llm._ctx.ctx, False)
29
 
30
+ raw = llm.embed("your text here")
31
+ ```
32
+
33
+ > **Note:** The GGUF outputs raw float embeddings only. The original model natively produces int8/binary quantized embeddings via a post-processing step (`st_quantize.FlexibleQuantizer`). To match that behavior, apply the quantization manually:
34
+
35
+ ```python
36
+ import numpy as np
37
+
38
+ # Int8: tanh → scale → round → clamp (matches Int8TanhQuantizer)
39
+ int8_emb = np.clip(np.round(np.tanh(raw) * 127), -128, 127).astype(np.int8)
40
+
41
+ # Binary: sign (matches BinaryTanhQuantizer)
42
+ binary_emb = np.where(np.array(raw) >= 0, 1, -1).astype(np.int8)
43
  ```
44
 
45
  CLI: