How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-generation", model="cpral/Nex-N2-Pro-EXL3-5BPW")
messages = [
    {
        "role": "user",
        "content": [
            {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
            {"type": "text", "text": "What animal is on the candy?"}
        ]
    },
]
pipe(text=messages)
# Load model directly
from transformers import AutoProcessor, AutoModelForMultimodalLM

processor = AutoProcessor.from_pretrained("cpral/Nex-N2-Pro-EXL3-5BPW")
model = AutoModelForMultimodalLM.from_pretrained("cpral/Nex-N2-Pro-EXL3-5BPW", device_map="auto")
messages = [
    {
        "role": "user",
        "content": [
            {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
            {"type": "text", "text": "What animal is on the candy?"}
        ]
    },
]
inputs = processor.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(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:]))
Quick Links

Configuration Parsing Warning:In config.json: "quantization_config.bits" must be an integer

5BPW EXL3 quant of Nex-N2-Pro 397B.

 -- A perplexity:  3.27108474
 -- B perplexity:  3.28186725
 -- A label in top-K:
      K = 1: 0.7133
      K = 2: 0.8113
      K = 3: 0.8532
      K = 4: 0.8767
      K = 5: 0.8923
 -- B label in top-K:
      K = 1: 0.7121
      K = 2: 0.8109
      K = 3: 0.8530
      K = 4: 0.8766
      K = 5: 0.8923
 -- Top-K agreement, A vs B:
      K = 1: 0.9714
      K = 2: 0.8759
      K = 3: 0.7432
      K = 4: 0.5986
      K = 5: 0.4631
 -- KL divergence (A, B):  0.00968818
 -- KL divergence (B, A):  0.00957145
Downloads last month
5
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for cpral/Nex-N2-Pro-EXL3-5BPW

Quantized
(23)
this model