Image-Text-to-Text
MLX
Safetensors
nemotron_parse
ocr
document-parsing
vision-encoder-decoder
multimodal
custom_code
4-bit precision
Instructions to use mlx-community/Nemotron-Parse-2.0-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/Nemotron-Parse-2.0-4bit with MLX:
# Make sure mlx-vlm is installed # pip install --upgrade mlx-vlm from mlx_vlm import load, generate from mlx_vlm.prompt_utils import apply_chat_template from mlx_vlm.utils import load_config # Load the model model, processor = load("mlx-community/Nemotron-Parse-2.0-4bit") config = load_config("mlx-community/Nemotron-Parse-2.0-4bit") # Prepare input image = ["http://images.cocodataset.org/val2017/000000039769.jpg"] prompt = "Describe this image." # Apply chat template formatted_prompt = apply_chat_template( processor, config, prompt, num_images=1 ) # Generate output output = generate(model, processor, formatted_prompt, image) print(output) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
| { | |
| "metadata": { | |
| "transformers_version": "5.6.2", | |
| "torch_version": "2.11.0+cu130", | |
| "device": "cuda:0", | |
| "dtype": "torch.bfloat16", | |
| "model_path": "nvidia/NVIDIA-Nemotron-Parse-2.0" | |
| }, | |
| "image_processing": { | |
| "shape": [ | |
| 1, | |
| 3, | |
| 2048, | |
| 1664 | |
| ], | |
| "mean": 2.03157114982605, | |
| "std": 0.1422039270401001, | |
| "first_20_values": [ | |
| 1.9303361177444458, | |
| 1.9303361177444458, | |
| 1.9303361177444458, | |
| 1.9303361177444458, | |
| 1.9303361177444458, | |
| 1.9303361177444458, | |
| 1.9303361177444458, | |
| 1.9303361177444458, | |
| 1.9303361177444458, | |
| 1.9303361177444458, | |
| 1.9303361177444458, | |
| 1.9303361177444458, | |
| 1.9303361177444458, | |
| 1.9303361177444458, | |
| 1.9303361177444458, | |
| 1.9303361177444458, | |
| 1.9303361177444458, | |
| 1.9303361177444458, | |
| 1.9303361177444458, | |
| 1.9303361177444458 | |
| ] | |
| }, | |
| "encoder_output": { | |
| "shape": [ | |
| 1, | |
| 3329, | |
| 1024 | |
| ], | |
| "mean": 0.0006403356092050672, | |
| "std": 0.9255462884902954, | |
| "token0_first16": [ | |
| 0.4609375, | |
| 1.1171875, | |
| 0.244140625, | |
| -0.86328125, | |
| -0.0390625, | |
| -0.068359375, | |
| 0.62890625, | |
| 1.3515625, | |
| 0.54296875, | |
| -0.431640625, | |
| -0.71875, | |
| 0.7578125, | |
| 0.9921875, | |
| 1.484375, | |
| -0.1474609375, | |
| 1.125 | |
| ] | |
| }, | |
| "forward_pass": { | |
| "logits_shape": [ | |
| 1, | |
| 1, | |
| 72256 | |
| ], | |
| "top_k_indices": [ | |
| 0, | |
| 30964, | |
| 31501, | |
| 38394, | |
| 6957, | |
| 1972, | |
| 23972, | |
| 25230, | |
| 12765, | |
| 2583 | |
| ], | |
| "top_k_values": [ | |
| 56.5, | |
| 38.0, | |
| 37.75, | |
| 37.5, | |
| 37.5, | |
| 37.5, | |
| 37.25, | |
| 37.25, | |
| 37.25, | |
| 37.25 | |
| ] | |
| }, | |
| "generation": { | |
| "max_new_tokens": 50, | |
| "token_ids": [ | |
| 2, | |
| 0, | |
| 50004, | |
| 50008, | |
| 50001, | |
| 50010, | |
| 50022, | |
| 51346, | |
| 82, | |
| 2722, | |
| 113, | |
| 18121, | |
| 579, | |
| 115, | |
| 113, | |
| 19321, | |
| 89, | |
| 115, | |
| 221, | |
| 82, | |
| 493, | |
| 113, | |
| 18121, | |
| 579, | |
| 115, | |
| 50245, | |
| 51398, | |
| 52327, | |
| 2 | |
| ], | |
| "decoded_text": "</s><s><predict_bbox><predict_classes><output_markdown><predict_no_text_in_pic><x_0.0107><y_0.243>\\begin{tabular}{ccccc}\n\\end{tabular}<x_0.2285><y_0.2836><class_Table></s>" | |
| } | |
| } | |