Text Generation
Transformers
PyTorch
lfm2_vl
image-text-to-text
bf16
iris-3b
full-precision
vllm
xinference
custom_code
Instructions to use rty813/iris-3b-bf16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use rty813/iris-3b-bf16 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="rty813/iris-3b-bf16", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("rty813/iris-3b-bf16", trust_remote_code=True) model = AutoModelForMultimodalLM.from_pretrained("rty813/iris-3b-bf16", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use rty813/iris-3b-bf16 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "rty813/iris-3b-bf16" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "rty813/iris-3b-bf16", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/rty813/iris-3b-bf16
- SGLang
How to use rty813/iris-3b-bf16 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 "rty813/iris-3b-bf16" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "rty813/iris-3b-bf16", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "rty813/iris-3b-bf16" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "rty813/iris-3b-bf16", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use rty813/iris-3b-bf16 with Docker Model Runner:
docker model run hf.co/rty813/iris-3b-bf16
fix config
Browse files- config.json +93 -115
config.json
CHANGED
|
@@ -1,141 +1,119 @@
|
|
| 1 |
{
|
| 2 |
"architectures": [
|
| 3 |
-
"
|
| 4 |
],
|
| 5 |
-
"
|
| 6 |
-
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
"text_config": {
|
| 9 |
-
"
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
"dtype": "bfloat16",
|
| 14 |
-
"eos_token_id":
|
| 15 |
-
"
|
| 16 |
-
"
|
| 17 |
-
"hidden_act": "silu",
|
| 18 |
-
"hidden_size": 5120,
|
| 19 |
"initializer_range": 0.02,
|
| 20 |
-
"intermediate_size":
|
| 21 |
"layer_types": [
|
| 22 |
-
"
|
| 23 |
-
"
|
| 24 |
-
"linear_attention",
|
| 25 |
-
"full_attention",
|
| 26 |
-
"linear_attention",
|
| 27 |
-
"linear_attention",
|
| 28 |
-
"linear_attention",
|
| 29 |
-
"full_attention",
|
| 30 |
-
"linear_attention",
|
| 31 |
-
"linear_attention",
|
| 32 |
-
"linear_attention",
|
| 33 |
-
"full_attention",
|
| 34 |
-
"linear_attention",
|
| 35 |
-
"linear_attention",
|
| 36 |
-
"linear_attention",
|
| 37 |
-
"full_attention",
|
| 38 |
-
"linear_attention",
|
| 39 |
-
"linear_attention",
|
| 40 |
-
"linear_attention",
|
| 41 |
"full_attention",
|
| 42 |
-
"
|
| 43 |
-
"
|
| 44 |
-
"linear_attention",
|
| 45 |
"full_attention",
|
| 46 |
-
"
|
| 47 |
-
"
|
| 48 |
-
"
|
| 49 |
"full_attention",
|
| 50 |
-
"
|
| 51 |
-
"
|
| 52 |
-
"
|
| 53 |
"full_attention",
|
| 54 |
-
"
|
| 55 |
-
"
|
| 56 |
-
"
|
| 57 |
"full_attention",
|
| 58 |
-
"
|
| 59 |
-
"
|
| 60 |
-
"
|
| 61 |
"full_attention",
|
| 62 |
-
"
|
| 63 |
-
"
|
| 64 |
-
"linear_attention",
|
| 65 |
"full_attention",
|
| 66 |
-
"
|
| 67 |
-
"
|
| 68 |
-
"linear_attention",
|
| 69 |
"full_attention",
|
| 70 |
-
"
|
| 71 |
-
"
|
| 72 |
-
"linear_attention",
|
| 73 |
-
"full_attention",
|
| 74 |
-
"linear_attention",
|
| 75 |
-
"linear_attention",
|
| 76 |
-
"linear_attention",
|
| 77 |
-
"full_attention",
|
| 78 |
-
"linear_attention",
|
| 79 |
-
"linear_attention",
|
| 80 |
-
"linear_attention",
|
| 81 |
-
"full_attention",
|
| 82 |
-
"linear_attention",
|
| 83 |
-
"linear_attention",
|
| 84 |
-
"linear_attention",
|
| 85 |
-
"full_attention"
|
| 86 |
],
|
| 87 |
-
"
|
| 88 |
-
"
|
| 89 |
-
"
|
| 90 |
-
"
|
| 91 |
-
"
|
| 92 |
-
"
|
| 93 |
-
"
|
| 94 |
-
"
|
| 95 |
-
"
|
| 96 |
-
"mtp_use_dedicated_embeddings": false,
|
| 97 |
-
"num_attention_heads": 24,
|
| 98 |
-
"num_hidden_layers": 64,
|
| 99 |
-
"num_key_value_heads": 4,
|
| 100 |
-
"output_gate_type": "swish",
|
| 101 |
-
"pad_token_id": null,
|
| 102 |
-
"partial_rotary_factor": 0.25,
|
| 103 |
-
"rms_norm_eps": 1e-06,
|
| 104 |
"rope_parameters": {
|
| 105 |
-
"
|
| 106 |
-
"mrope_section": [
|
| 107 |
-
11,
|
| 108 |
-
11,
|
| 109 |
-
10
|
| 110 |
-
],
|
| 111 |
-
"partial_rotary_factor": 0.25,
|
| 112 |
-
"rope_theta": 10000000,
|
| 113 |
"rope_type": "default"
|
| 114 |
},
|
| 115 |
-
"tie_word_embeddings":
|
| 116 |
"use_cache": true,
|
| 117 |
-
"
|
|
|
|
| 118 |
},
|
| 119 |
-
"tie_word_embeddings":
|
| 120 |
-
"
|
| 121 |
-
"
|
|
|
|
|
|
|
| 122 |
"vision_config": {
|
| 123 |
-
"
|
| 124 |
-
"
|
| 125 |
"hidden_act": "gelu_pytorch_tanh",
|
| 126 |
"hidden_size": 1152,
|
| 127 |
-
"in_channels": 3,
|
| 128 |
-
"initializer_range": 0.02,
|
| 129 |
"intermediate_size": 4304,
|
| 130 |
-
"
|
| 131 |
-
"
|
| 132 |
-
"
|
| 133 |
-
"
|
|
|
|
|
|
|
| 134 |
"patch_size": 16,
|
| 135 |
-
"
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
"vision_end_token_id": 248054,
|
| 139 |
-
"vision_start_token_id": 248053,
|
| 140 |
-
"torch_dtype": "bfloat16"
|
| 141 |
-
}
|
|
|
|
| 1 |
{
|
| 2 |
"architectures": [
|
| 3 |
+
"Lfm2VlForConditionalGeneration"
|
| 4 |
],
|
| 5 |
+
"auto_map": {
|
| 6 |
+
"AutoModel": "modeling_d1.D1Model"
|
| 7 |
+
},
|
| 8 |
+
"bos_token_id": 124894,
|
| 9 |
+
"do_image_splitting": true,
|
| 10 |
+
"do_resize": true,
|
| 11 |
+
"downsample_factor": 2,
|
| 12 |
+
"dtype": "bfloat16",
|
| 13 |
+
"encoder_patch_size": 16,
|
| 14 |
+
"eos_token_id": 124900,
|
| 15 |
+
"image_token_id": 124907,
|
| 16 |
+
"max_image_tokens": 256,
|
| 17 |
+
"max_num_patches": 1024,
|
| 18 |
+
"max_pixels_tolerance": 2.0,
|
| 19 |
+
"max_tiles": 10,
|
| 20 |
+
"min_image_tokens": 64,
|
| 21 |
+
"min_tiles": 2,
|
| 22 |
+
"model_type": "lfm2_vl",
|
| 23 |
+
"pad_token_id": 124893,
|
| 24 |
+
"projector_bias": true,
|
| 25 |
+
"projector_hidden_act": "gelu",
|
| 26 |
+
"projector_hidden_size": 2048,
|
| 27 |
+
"projector_use_layernorm": false,
|
| 28 |
"text_config": {
|
| 29 |
+
"architectures": [
|
| 30 |
+
"Lfm2ForCausalLM"
|
| 31 |
+
],
|
| 32 |
+
"block__name_mlp": "parallel_mlp_merged",
|
| 33 |
+
"block_auto_adjust_ff_dim": false,
|
| 34 |
+
"block_dim": 2048,
|
| 35 |
+
"block_ffn_dim_multiplier": 1.0,
|
| 36 |
+
"block_multiple_of": 256,
|
| 37 |
+
"block_norm_eps": 1e-05,
|
| 38 |
+
"block_use_swiglu": true,
|
| 39 |
+
"bos_token_id": 124894,
|
| 40 |
+
"conv_L_cache": 3,
|
| 41 |
+
"conv_bias": false,
|
| 42 |
+
"conv_dim": 2048,
|
| 43 |
"dtype": "bfloat16",
|
| 44 |
+
"eos_token_id": 124900,
|
| 45 |
+
"full_attn_idxs": null,
|
| 46 |
+
"hidden_size": 2048,
|
|
|
|
|
|
|
| 47 |
"initializer_range": 0.02,
|
| 48 |
+
"intermediate_size": 10752,
|
| 49 |
"layer_types": [
|
| 50 |
+
"conv",
|
| 51 |
+
"conv",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
"full_attention",
|
| 53 |
+
"conv",
|
| 54 |
+
"conv",
|
|
|
|
| 55 |
"full_attention",
|
| 56 |
+
"conv",
|
| 57 |
+
"conv",
|
| 58 |
+
"conv",
|
| 59 |
"full_attention",
|
| 60 |
+
"conv",
|
| 61 |
+
"conv",
|
| 62 |
+
"conv",
|
| 63 |
"full_attention",
|
| 64 |
+
"conv",
|
| 65 |
+
"conv",
|
| 66 |
+
"conv",
|
| 67 |
"full_attention",
|
| 68 |
+
"conv",
|
| 69 |
+
"conv",
|
| 70 |
+
"conv",
|
| 71 |
"full_attention",
|
| 72 |
+
"conv",
|
| 73 |
+
"conv",
|
|
|
|
| 74 |
"full_attention",
|
| 75 |
+
"conv",
|
| 76 |
+
"conv",
|
|
|
|
| 77 |
"full_attention",
|
| 78 |
+
"conv",
|
| 79 |
+
"conv"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
],
|
| 81 |
+
"max_position_embeddings": 32768,
|
| 82 |
+
"model_type": "lfm2",
|
| 83 |
+
"norm_eps": 1e-05,
|
| 84 |
+
"num_attention_heads": 32,
|
| 85 |
+
"num_heads": 32,
|
| 86 |
+
"num_hidden_layers": 30,
|
| 87 |
+
"num_key_value_heads": 8,
|
| 88 |
+
"output_softcap": 0.0,
|
| 89 |
+
"pad_token_id": 124893,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 90 |
"rope_parameters": {
|
| 91 |
+
"rope_theta": 1000000.0,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 92 |
"rope_type": "default"
|
| 93 |
},
|
| 94 |
+
"tie_word_embeddings": true,
|
| 95 |
"use_cache": true,
|
| 96 |
+
"use_pos_enc": true,
|
| 97 |
+
"vocab_size": 128000
|
| 98 |
},
|
| 99 |
+
"tie_word_embeddings": true,
|
| 100 |
+
"tile_size": 512,
|
| 101 |
+
"transformers_version": "5.14.1",
|
| 102 |
+
"use_image_special_tokens": true,
|
| 103 |
+
"use_thumbnail": true,
|
| 104 |
"vision_config": {
|
| 105 |
+
"attention_dropout": 0.0,
|
| 106 |
+
"dtype": "bfloat16",
|
| 107 |
"hidden_act": "gelu_pytorch_tanh",
|
| 108 |
"hidden_size": 1152,
|
|
|
|
|
|
|
| 109 |
"intermediate_size": 4304,
|
| 110 |
+
"layer_norm_eps": 1e-06,
|
| 111 |
+
"model_type": "siglip2_vision_model",
|
| 112 |
+
"num_attention_heads": 16,
|
| 113 |
+
"num_channels": 3,
|
| 114 |
+
"num_hidden_layers": 27,
|
| 115 |
+
"num_patches": 256,
|
| 116 |
"patch_size": 16,
|
| 117 |
+
"vision_use_head": false
|
| 118 |
+
}
|
| 119 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|