Image-Text-to-Text
Transformers
Safetensors
English
mistral3
text-generation-inference
unsloth
trl
conversational
Instructions to use hnuka/DFK-Base-Merged-Full-V2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hnuka/DFK-Base-Merged-Full-V2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="hnuka/DFK-Base-Merged-Full-V2") 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("hnuka/DFK-Base-Merged-Full-V2") model = AutoModelForMultimodalLM.from_pretrained("hnuka/DFK-Base-Merged-Full-V2") 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use hnuka/DFK-Base-Merged-Full-V2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "hnuka/DFK-Base-Merged-Full-V2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hnuka/DFK-Base-Merged-Full-V2", "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/hnuka/DFK-Base-Merged-Full-V2
- SGLang
How to use hnuka/DFK-Base-Merged-Full-V2 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 "hnuka/DFK-Base-Merged-Full-V2" \ --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": "hnuka/DFK-Base-Merged-Full-V2", "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 "hnuka/DFK-Base-Merged-Full-V2" \ --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": "hnuka/DFK-Base-Merged-Full-V2", "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" } } ] } ] }' - Unsloth Studio
How to use hnuka/DFK-Base-Merged-Full-V2 with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for hnuka/DFK-Base-Merged-Full-V2 to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for hnuka/DFK-Base-Merged-Full-V2 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for hnuka/DFK-Base-Merged-Full-V2 to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="hnuka/DFK-Base-Merged-Full-V2", max_seq_length=2048, ) - Docker Model Runner
How to use hnuka/DFK-Base-Merged-Full-V2 with Docker Model Runner:
docker model run hf.co/hnuka/DFK-Base-Merged-Full-V2
Upload model trained with Unsloth
Browse filesUpload model trained with Unsloth 2x faster
- config.json +74 -0
- generation_config.json +7 -0
- model.safetensors +3 -0
config.json
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"Mistral3ForConditionalGeneration"
|
| 4 |
+
],
|
| 5 |
+
"bos_token_id": 1,
|
| 6 |
+
"dtype": "bfloat16",
|
| 7 |
+
"eos_token_id": 2,
|
| 8 |
+
"image_token_index": 10,
|
| 9 |
+
"model_name": "unsloth/Ministral-3-8B-Base-2512",
|
| 10 |
+
"model_type": "mistral3",
|
| 11 |
+
"multimodal_projector_bias": false,
|
| 12 |
+
"pad_token_id": 11,
|
| 13 |
+
"projector_hidden_act": "gelu",
|
| 14 |
+
"spatial_merge_size": 2,
|
| 15 |
+
"text_config": {
|
| 16 |
+
"attention_dropout": 0.0,
|
| 17 |
+
"bos_token_id": 1,
|
| 18 |
+
"dtype": "bfloat16",
|
| 19 |
+
"eos_token_id": 2,
|
| 20 |
+
"head_dim": 128,
|
| 21 |
+
"hidden_act": "silu",
|
| 22 |
+
"hidden_size": 4096,
|
| 23 |
+
"initializer_range": 0.02,
|
| 24 |
+
"intermediate_size": 14336,
|
| 25 |
+
"max_position_embeddings": 262144,
|
| 26 |
+
"model_type": "ministral3",
|
| 27 |
+
"num_attention_heads": 32,
|
| 28 |
+
"num_hidden_layers": 34,
|
| 29 |
+
"num_key_value_heads": 8,
|
| 30 |
+
"pad_token_id": 11,
|
| 31 |
+
"rms_norm_eps": 1e-05,
|
| 32 |
+
"rope_parameters": {
|
| 33 |
+
"beta_fast": 32.0,
|
| 34 |
+
"beta_slow": 1.0,
|
| 35 |
+
"factor": 16.0,
|
| 36 |
+
"llama_4_scaling_beta": 0.1,
|
| 37 |
+
"mscale": 1.0,
|
| 38 |
+
"mscale_all_dim": 1.0,
|
| 39 |
+
"original_max_position_embeddings": 16384,
|
| 40 |
+
"rope_theta": 1000000.0,
|
| 41 |
+
"rope_type": "yarn",
|
| 42 |
+
"type": "yarn"
|
| 43 |
+
},
|
| 44 |
+
"sliding_window": null,
|
| 45 |
+
"tie_word_embeddings": false,
|
| 46 |
+
"use_cache": true,
|
| 47 |
+
"vocab_size": 131072
|
| 48 |
+
},
|
| 49 |
+
"tie_word_embeddings": false,
|
| 50 |
+
"transformers_version": "5.5.0",
|
| 51 |
+
"unsloth_fixed": true,
|
| 52 |
+
"unsloth_version": "2026.6.1",
|
| 53 |
+
"use_cache": false,
|
| 54 |
+
"vision_config": {
|
| 55 |
+
"attention_dropout": 0.0,
|
| 56 |
+
"dtype": "bfloat16",
|
| 57 |
+
"head_dim": 64,
|
| 58 |
+
"hidden_act": "silu",
|
| 59 |
+
"hidden_size": 1024,
|
| 60 |
+
"image_size": 1540,
|
| 61 |
+
"initializer_range": 0.02,
|
| 62 |
+
"intermediate_size": 4096,
|
| 63 |
+
"model_type": "pixtral",
|
| 64 |
+
"num_attention_heads": 16,
|
| 65 |
+
"num_channels": 3,
|
| 66 |
+
"num_hidden_layers": 24,
|
| 67 |
+
"patch_size": 14,
|
| 68 |
+
"rope_parameters": {
|
| 69 |
+
"rope_theta": 10000.0,
|
| 70 |
+
"rope_type": "default"
|
| 71 |
+
}
|
| 72 |
+
},
|
| 73 |
+
"vision_feature_layer": -1
|
| 74 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token_id": 1,
|
| 3 |
+
"eos_token_id": 2,
|
| 4 |
+
"max_length": 262144,
|
| 5 |
+
"pad_token_id": 11,
|
| 6 |
+
"transformers_version": "5.5.0"
|
| 7 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3ad0e66ab4efbc01b3d048224ad7c28496653455bcfd36aba74ac8bb37f50780
|
| 3 |
+
size 17836127088
|