Instructions to use groxaxo/octen-embedding-8b-w4a16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use groxaxo/octen-embedding-8b-w4a16 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="groxaxo/octen-embedding-8b-w4a16") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("groxaxo/octen-embedding-8b-w4a16") model = AutoModelForCausalLM.from_pretrained("groxaxo/octen-embedding-8b-w4a16") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use groxaxo/octen-embedding-8b-w4a16 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "groxaxo/octen-embedding-8b-w4a16" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "groxaxo/octen-embedding-8b-w4a16", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/groxaxo/octen-embedding-8b-w4a16
- SGLang
How to use groxaxo/octen-embedding-8b-w4a16 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "groxaxo/octen-embedding-8b-w4a16" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "groxaxo/octen-embedding-8b-w4a16", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "groxaxo/octen-embedding-8b-w4a16" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "groxaxo/octen-embedding-8b-w4a16", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use groxaxo/octen-embedding-8b-w4a16 with Docker Model Runner:
docker model run hf.co/groxaxo/octen-embedding-8b-w4a16
Octen-Embedding-8B W4A16
This repo contains a W4A16 quantized version of Octen/Octen-Embedding-8B in the validated auto-round-auto-gptq format.
Quantization
| Item | Value |
|---|---|
| Base model | Octen/Octen-Embedding-8B |
| Quantization | W4A16, 4-bit weights / 16-bit activations |
| Tooling | AutoRound 0.12.2, transformers 5.6.2, torch 2.6.0+cu124 |
| Calibration | 8 samples, seqlen 512, 200 iterations, float32 tuning |
| Quantized size | 8.1 GB, 2 shards |
| Base size | 15.0 GB |
| Compression | ~1.9x |
| Embedding dim | 4096 |
| Layers quantized | 252/253; lm_head skipped |
Validation vs base model
Evaluation used a small retrieval set of 5 query-document pairs, last-token pooling, L2 normalization, and cosine similarity.
| Metric | Base | W4A16 | Delta |
|---|---|---|---|
| Recall@1 | 0.8 | 1.0 | +0.2 |
| Recall@5 | 1.0 | 1.0 | 0.0 |
| Mean query cosine, base vs quant | — | 0.9840 | — |
| Mean doc cosine, base vs quant | — | 0.9820 | — |
Assessment: this model passed all validation gates cleanly, with >0.98 mean cosine to the base model and no retrieval degradation on the validation set.
See validation-8b-auto-round-auto-gptq.json for the raw metrics.
RTX 3060 smoke test
This quantized model was loaded and run on an RTX 3060 12GB GPU.
| Result | Value |
|---|---|
| VRAM after load | 4.53 GB |
| Single short-query forward pass | 0.9s smoke test; later benchmark ~612ms |
| Output shape | [1, 4, 4096] |
| Embeddings | Valid normalized vectors; no NaNs observed |
Recommended usage
import torch
from transformers import AutoModel, AutoTokenizer
model_id = "groxaxo/octen-embedding-8b-w4a16"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModel.from_pretrained(
model_id,
trust_remote_code=True,
torch_dtype=torch.float16,
).cuda().eval()
texts = ["how to implement binary search"]
tokens = tokenizer(texts, padding=True, truncation=True, max_length=512, return_tensors="pt")
tokens = {k: v.cuda() for k, v in tokens.items()}
with torch.no_grad():
out = model(**tokens)
emb = torch.nn.functional.normalize(out.last_hidden_state[:, -1, :], p=2, dim=-1)
Note: the model card records local validation and smoke-test results. For production use, evaluate on your own retrieval distribution.
- Downloads last month
- 484
docker model run hf.co/groxaxo/octen-embedding-8b-w4a16