Instructions to use DronE900/collegihein with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DronE900/collegihein with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="DronE900/collegihein") 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)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("DronE900/collegihein") model = AutoModelForMultimodalLM.from_pretrained("DronE900/collegihein", 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=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use DronE900/collegihein with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "DronE900/collegihein" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DronE900/collegihein", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/DronE900/collegihein
- SGLang
How to use DronE900/collegihein 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 "DronE900/collegihein" \ --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": "DronE900/collegihein", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "DronE900/collegihein" \ --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": "DronE900/collegihein", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use DronE900/collegihein with Docker Model Runner:
docker model run hf.co/DronE900/collegihein
Download config.json from DronE900/collegihein: direct link, hf CLI and curl.
- Browser
- Download file 8.22 kB
-
https://huggingface.co/DronE900/collegihein/resolve/main/config.json
- Command line
-
hf download hf://DronE900/collegihein/config.json
-
curl -L -o config.json https://huggingface.co/DronE900/collegihein/resolve/main/config.json
8.22 kB
| { | |
| "architectures": ["MistralLarge4ForConditionalGeneration"], | |
| "dtype": "bfloat16", | |
| "image_token_index": 10, | |
| "model_type": "mistral_large4", | |
| "multimodal_projector_bias": false, | |
| "projector_hidden_act": "gelu", | |
| "quantization_config": { | |
| "activation_scheme": "dynamic", | |
| "modules_to_not_convert": [ | |
| "model.vision_tower", | |
| "model.multi_modal_projector", | |
| "lm_head", | |
| "kv_b_proj", | |
| "indexer.wk", | |
| "indexer.weights_proj", | |
| "kv_a_proj_with_mqa" | |
| ], | |
| "quant_method": "fp8", | |
| "weight_block_size": [ | |
| 128, | |
| 128 | |
| ] | |
| }, | |
| "spatial_merge_size": 2, | |
| "text_config": { | |
| "attention_bias": false, | |
| "attention_dropout": 0.0, | |
| "bos_token_id": 1, | |
| "eos_token_id": 2, | |
| "final_logit_softcapping": 30.0, | |
| "first_k_dense_replace": 1, | |
| "head_dim": 64, | |
| "hidden_act": "silu", | |
| "hidden_size": 6144, | |
| "index_head_dim": 128, | |
| "index_n_heads": 32, | |
| "index_topk": 2048, | |
| "indexer_types": [ | |
| "full", | |
| "full", | |
| "full", | |
| "full", | |
| "full", | |
| "full", | |
| "full", | |
| "full", | |
| "full", | |
| "full", | |
| "full", | |
| "full", | |
| "full", | |
| "full", | |
| "full", | |
| "full", | |
| "full", | |
| "shared", | |
| "shared", | |
| "full", | |
| "full", | |
| "shared", | |
| "shared", | |
| "full", | |
| "full", | |
| "shared", | |
| "shared", | |
| "full", | |
| "full", | |
| "shared", | |
| "shared", | |
| "full", | |
| "full", | |
| "shared", | |
| "shared", | |
| "full", | |
| "full", | |
| "shared", | |
| "shared", | |
| "full", | |
| "full", | |
| "shared", | |
| "shared", | |
| "full", | |
| "full", | |
| "shared", | |
| "shared", | |
| "full", | |
| "full", | |
| "shared", | |
| "shared", | |
| "full", | |
| "full", | |
| "shared", | |
| "shared", | |
| "full", | |
| "full", | |
| "shared", | |
| "shared", | |
| "full", | |
| "full", | |
| "shared", | |
| "shared", | |
| "full", | |
| "full", | |
| "shared", | |
| "shared", | |
| "full", | |
| "full", | |
| "shared", | |
| "shared", | |
| "full" | |
| ], | |
| "initializer_range": 0.02, | |
| "intermediate_size": 24576, | |
| "kv_lora_rank": 512, | |
| "kv_source_layers": [ | |
| 0, | |
| 1, | |
| 2, | |
| 3, | |
| 4, | |
| 5, | |
| 6, | |
| 7, | |
| 8, | |
| 9, | |
| 10, | |
| 11, | |
| 12, | |
| 13, | |
| 14, | |
| 15, | |
| 16, | |
| 17, | |
| 18, | |
| 19, | |
| 20, | |
| 21, | |
| 22, | |
| 23, | |
| 24, | |
| 25, | |
| 26, | |
| 27, | |
| 28, | |
| 29, | |
| 30, | |
| 31, | |
| 32, | |
| 33, | |
| 34, | |
| 35, | |
| 36, | |
| 37, | |
| 38, | |
| 35, | |
| 40, | |
| 41, | |
| 42, | |
| 35, | |
| 44, | |
| 45, | |
| 46, | |
| 35, | |
| 48, | |
| 49, | |
| 50, | |
| 35, | |
| 52, | |
| 53, | |
| 54, | |
| 35, | |
| 56, | |
| 57, | |
| 58, | |
| 35, | |
| 60, | |
| 61, | |
| 62, | |
| 35, | |
| 64, | |
| 65, | |
| 66, | |
| 35, | |
| 68, | |
| 69, | |
| 70, | |
| 35 | |
| ], | |
| "layer_types": [ | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention", | |
| "indexed_attention" | |
| ], | |
| "max_position_embeddings": 1048576, | |
| "mlp_layer_types": [ | |
| "dense", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse", | |
| "sparse" | |
| ], | |
| "model_type": "mistral_large4_text", | |
| "moe_intermediate_size": 6144, | |
| "n_group": 1, | |
| "n_routed_experts": 128, | |
| "n_shared_experts": 1, | |
| "no_rope_layer_interval": 4, | |
| "no_rope_layers": [ | |
| 1, | |
| 1, | |
| 1, | |
| 0, | |
| 1, | |
| 1, | |
| 1, | |
| 0, | |
| 1, | |
| 1, | |
| 1, | |
| 0, | |
| 1, | |
| 1, | |
| 1, | |
| 0, | |
| 1, | |
| 1, | |
| 1, | |
| 0, | |
| 1, | |
| 1, | |
| 1, | |
| 0, | |
| 1, | |
| 1, | |
| 1, | |
| 0, | |
| 1, | |
| 1, | |
| 1, | |
| 0, | |
| 1, | |
| 1, | |
| 1, | |
| 0, | |
| 1, | |
| 1, | |
| 1, | |
| 0, | |
| 1, | |
| 1, | |
| 1, | |
| 0, | |
| 1, | |
| 1, | |
| 1, | |
| 0, | |
| 1, | |
| 1, | |
| 1, | |
| 0, | |
| 1, | |
| 1, | |
| 1, | |
| 0, | |
| 1, | |
| 1, | |
| 1, | |
| 0, | |
| 1, | |
| 1, | |
| 1, | |
| 0, | |
| 1, | |
| 1, | |
| 1, | |
| 0, | |
| 1, | |
| 1, | |
| 1, | |
| 0 | |
| ], | |
| "num_attention_heads": 64, | |
| "num_experts_per_tok": 4, | |
| "num_hidden_layers": 72, | |
| "num_key_value_heads": 64, | |
| "output_router_logits": false, | |
| "pad_token_id": null, | |
| "qk_head_dim": 128, | |
| "qk_nope_head_dim": 64, | |
| "qk_rope_head_dim": 64, | |
| "rms_norm_eps": 1e-05, | |
| "rope_parameters": { | |
| "attention_factor": 1.0, | |
| "beta_fast": 32, | |
| "beta_slow": 1, | |
| "factor": 2048, | |
| "original_max_position_embeddings": 512, | |
| "rope_theta": 10000.0, | |
| "rope_type": "yarn" | |
| }, | |
| "routed_scaling_factor": 1.0, | |
| "tie_word_embeddings": false, | |
| "topk_group": 1, | |
| "use_cache": true, | |
| "v_head_dim": 128, | |
| "vocab_size": 204800 | |
| }, | |
| "tie_word_embeddings": false, | |
| "transformers_version": "5.21.0.dev0", | |
| "transformers_weights": "consolidated.safetensors.index.json", | |
| "vision_config": { | |
| "attention_dropout": 0.0, | |
| "head_dim": 128, | |
| "hidden_act": "silu", | |
| "hidden_size": 2048, | |
| "image_size": 1540, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 6144, | |
| "model_type": "pixtral", | |
| "num_attention_heads": 16, | |
| "num_channels": 3, | |
| "num_hidden_layers": 30, | |
| "patch_size": 14, | |
| "rope_parameters": { | |
| "rope_theta": 10000.0, | |
| "rope_type": "axial" | |
| } | |
| }, | |
| "vision_feature_layer": -1 | |
| } | |