Any-to-Any
Transformers
PyTorch
Safetensors
multi_modality
muiltimodal
text-to-image
unified-model
4-bit precision
bitsandbytes
Instructions to use neilmehta24/janus-pro-7b-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use neilmehta24/janus-pro-7b-4bit with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import MultiModalityCausalLM model = MultiModalityCausalLM.from_pretrained("neilmehta24/janus-pro-7b-4bit", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download config.json from neilmehta24/janus-pro-7b-4bit: direct link, hf CLI and curl.
- Browser
- Download file 1.99 kB
-
https://huggingface.co/neilmehta24/janus-pro-7b-4bit/resolve/main/config.json
- Command line
-
hf download hf://neilmehta24/janus-pro-7b-4bit/config.json
-
curl -L -o config.json https://huggingface.co/neilmehta24/janus-pro-7b-4bit/resolve/main/config.json
1.99 kB
| { | |
| "_name_or_path": "deepseek-ai/Janus-Pro-7B", | |
| "aligner_config": { | |
| "cls": "MlpProjector", | |
| "model_type": "aligner", | |
| "params": { | |
| "depth": 2, | |
| "input_dim": 1024, | |
| "n_embed": 4096, | |
| "projector_type": "mlp_gelu" | |
| } | |
| }, | |
| "architectures": [ | |
| "MultiModalityCausalLM" | |
| ], | |
| "gen_aligner_config": { | |
| "cls": "MlpProjector", | |
| "model_type": "gen_aligner", | |
| "params": { | |
| "depth": 2, | |
| "input_dim": 8, | |
| "n_embed": 4096, | |
| "projector_type": "mlp_gelu" | |
| } | |
| }, | |
| "gen_head_config": { | |
| "cls": "vision_head", | |
| "model_type": "gen_head", | |
| "params": { | |
| "image_token_embed": 4096, | |
| "image_token_size": 16384, | |
| "n_embed": 4096 | |
| } | |
| }, | |
| "gen_vision_config": { | |
| "cls": "VQ-16", | |
| "model_type": "gen_vision", | |
| "params": { | |
| "image_token_size": 16384, | |
| "n_embed": 8 | |
| } | |
| }, | |
| "language_config": { | |
| "_attn_implementation_autoset": true, | |
| "max_position_embeddings": 16384, | |
| "model_type": "llama", | |
| "num_hidden_layers": 30, | |
| "torch_dtype": "bfloat16", | |
| "vocab_size": 102400 | |
| }, | |
| "model_type": "multi_modality", | |
| "quantization_config": { | |
| "_load_in_4bit": true, | |
| "_load_in_8bit": false, | |
| "bnb_4bit_compute_dtype": "float32", | |
| "bnb_4bit_quant_storage": "uint8", | |
| "bnb_4bit_quant_type": "fp4", | |
| "bnb_4bit_use_double_quant": false, | |
| "llm_int8_enable_fp32_cpu_offload": false, | |
| "llm_int8_has_fp16_weight": false, | |
| "llm_int8_skip_modules": null, | |
| "llm_int8_threshold": 6.0, | |
| "load_in_4bit": true, | |
| "load_in_8bit": false, | |
| "quant_method": "bitsandbytes" | |
| }, | |
| "torch_dtype": "bfloat16", | |
| "transformers_version": "4.48.1", | |
| "vision_config": { | |
| "cls": "CLIPVisionTower", | |
| "model_type": "vision", | |
| "params": { | |
| "image_size": 384, | |
| "model_name": "siglip_large_patch16_384", | |
| "select_feature": "same", | |
| "select_layer": -1 | |
| } | |
| } | |
| } | |