Skip to content

Commit c10b3fb

Browse files
authored
add glm4.1v vision model
1 parent 05e49ea commit c10b3fb

File tree

2 files changed

+143
-45
lines changed

2 files changed

+143
-45
lines changed

src/constants.py

Lines changed: 69 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,8 @@
553553
'cache_dir': 'BAAI--bge-small-en-v1.5',
554554
'type': 'vector',
555555
'parameters': '33.4m',
556-
'precision': 'float32'
556+
'precision': 'float32',
557+
'license': 'mit',
557558
},
558559
{
559560
'name': 'bge-base-en-v1.5',
@@ -564,7 +565,8 @@
564565
'cache_dir': 'BAAI--bge-base-en-v1.5',
565566
'type': 'vector',
566567
'parameters': '109m',
567-
'precision': 'float32'
568+
'precision': 'float32',
569+
'license': 'mit',
568570
},
569571
{
570572
'name': 'bge-large-en-v1.5',
@@ -575,7 +577,8 @@
575577
'cache_dir': 'BAAI--bge-large-en-v1.5',
576578
'type': 'vector',
577579
'parameters': '335m',
578-
'precision': 'float32'
580+
'precision': 'float32',
581+
'license': 'mit',
579582
},
580583
# {
581584
# 'name': 'bge-code-v1',# transformers 4.49.0
@@ -586,7 +589,8 @@
586589
# 'cache_dir': 'BAAI--bge-code-v1',
587590
# 'type': 'vector',
588591
# 'parameters': '1540m',
589-
# 'precision': 'float32'
592+
# 'precision': 'float32',
593+
# 'license': 'apache-2.0',
590594
# },
591595
],
592596
'IBM': [
@@ -599,7 +603,8 @@
599603
'cache_dir': 'ibm-granite--granite-embedding-30m-english',
600604
'type': 'vector',
601605
'parameters': '30.3m',
602-
'precision': 'bfloat16'
606+
'precision': 'bfloat16',
607+
'license': 'apache-2.0',
603608
},
604609
{
605610
'name': 'Granite-125m-English',
@@ -610,7 +615,8 @@
610615
'cache_dir': 'ibm-granite--granite-embedding-125m-english',
611616
'type': 'vector',
612617
'parameters': '125m',
613-
'precision': 'bfloat16'
618+
'precision': 'bfloat16',
619+
'license': 'apache-2.0',
614620
},
615621
],
616622
'infly': [
@@ -623,7 +629,8 @@
623629
'cache_dir': 'infly--inf-retriever-v1-1.5b',
624630
'type': 'vector',
625631
'parameters': '1540m',
626-
'precision': 'bfloat16'
632+
'precision': 'bfloat16',
633+
'license': 'apache-2.0',
627634
},
628635
{
629636
'name': 'inf-retriever-v1-7b',# transformers 4.44.2
@@ -634,7 +641,8 @@
634641
'cache_dir': 'infly--inf-retriever-v1-7b',
635642
'type': 'vector',
636643
'parameters': '7070m',
637-
'precision': 'bfloat16'
644+
'precision': 'bfloat16',
645+
'license': 'apache-2.0',
638646
},
639647
],
640648
'intfloat': [
@@ -647,7 +655,8 @@
647655
'cache_dir': 'intfloat--e5-small-v2',
648656
'type': 'vector',
649657
'parameters': '33.4m',
650-
'precision': 'float32'
658+
'precision': 'float32',
659+
'license': 'mit',
651660
},
652661
{
653662
'name': 'e5-base-v2',
@@ -658,7 +667,8 @@
658667
'cache_dir': 'intfloat--e5-base-v2',
659668
'type': 'vector',
660669
'parameters': '109m',
661-
'precision': 'float32'
670+
'precision': 'float32',
671+
'license': 'mit',
662672
},
663673
{
664674
'name': 'e5-large-v2',
@@ -669,7 +679,8 @@
669679
'cache_dir': 'intfloat--e5-large-v2',
670680
'type': 'vector',
671681
'parameters': '335m',
672-
'precision': 'float32'
682+
'precision': 'float32',
683+
'license': 'mit',
673684
},
674685
],
675686
'Qwen': [
@@ -682,7 +693,8 @@
682693
'cache_dir': 'Qwen--Qwen3-Embedding-0.6B',
683694
'type': 'vector',
684695
'parameters': '596m',
685-
'precision': 'bfloat16'
696+
'precision': 'bfloat16',
697+
'license': 'apache-2.0',
686698
},
687699
{
688700
'name': 'Qwen3-Embedding-4B',
@@ -693,7 +705,8 @@
693705
'cache_dir': 'Qwen--Qwen3-Embedding-4B',
694706
'type': 'vector',
695707
'parameters': '4020m',
696-
'precision': 'bfloat16'
708+
'precision': 'bfloat16',
709+
'license': 'apache-2.0',
697710
},
698711
{
699712
'name': 'Qwen3-Embedding-8B',
@@ -704,7 +717,8 @@
704717
'cache_dir': 'Qwen--Qwen3-Embedding-8B',
705718
'type': 'vector',
706719
'parameters': '7570m',
707-
'precision': 'bfloat16'
720+
'precision': 'bfloat16',
721+
'license': 'apache-2.0',
708722
},
709723
],
710724
'Snowflake': [
@@ -717,7 +731,8 @@
717731
'cache_dir': 'Snowflake--snowflake-arctic-embed-m-v2.0',
718732
'type': 'vector',
719733
'parameters': '305m',
720-
'precision': 'float32'
734+
'precision': 'float32',
735+
'license': 'apache-2.0',
721736
},
722737
{
723738
'name': 'arctic-embed-l-v2.0',
@@ -728,7 +743,8 @@
728743
'cache_dir': 'Snowflake--snowflake-arctic-embed-l-v2.0',
729744
'type': 'vector',
730745
'parameters': '568m',
731-
'precision': 'float32'
746+
'precision': 'float32',
747+
'license': 'apache-2.0',
732748
},
733749
],
734750
}
@@ -742,7 +758,8 @@
742758
'cache_dir': 'OpenGVLab--InternVL3-1B',
743759
'requires_cuda': False,
744760
'vram': '2.4 GB',
745-
'loader': 'loader_internvl'
761+
'loader': 'loader_internvl',
762+
'license': 'apache-2.0',
746763
},
747764
'Ovis2 - 1b': {
748765
'precision': 'bfloat16',
@@ -752,7 +769,8 @@
752769
'cache_dir': 'AIDC-AI--Ovis2-1B',
753770
'requires_cuda': False,
754771
'vram': '2.4 GB',
755-
'loader': 'loader_ovis'
772+
'loader': 'loader_ovis',
773+
'license': 'apache-2.0',
756774
},
757775
'InternVL3 - 2b': {
758776
'precision': 'bfloat16',
@@ -762,7 +780,8 @@
762780
'cache_dir': 'OpenGVLab--InternVL3-2B',
763781
'requires_cuda': False,
764782
'vram': '3.2 GB',
765-
'loader': 'loader_internvl'
783+
'loader': 'loader_internvl',
784+
'license': 'apache-2.0',
766785
},
767786
'Granite Vision - 2b': {# transformers 4.46.0.dev0
768787
'precision': 'bfloat16',
@@ -772,7 +791,8 @@
772791
'cache_dir': 'ibm-granite--granite-vision-3.2-2b',
773792
'requires_cuda': False,
774793
'vram': '4.1 GB',
775-
'loader': 'loader_granite'
794+
'loader': 'loader_granite',
795+
'license': 'apache-2.0',
776796
},
777797
'Ovis2 - 2b': {
778798
'precision': 'bfloat16',
@@ -782,7 +802,8 @@
782802
'cache_dir': 'AIDC-AI--Ovis2-2B',
783803
'requires_cuda': False,
784804
'vram': '2.4 GB',
785-
'loader': 'loader_ovis'
805+
'loader': 'loader_ovis',
806+
'license': 'apache-2.0',
786807
},
787808
'Qwen VL - 3b': {
788809
'precision': 'bfloat16',
@@ -792,7 +813,8 @@
792813
'cache_dir': 'Qwen--Qwen2.5-VL-3B-Instruct',
793814
'requires_cuda': True,
794815
'vram': '6.3 GB',
795-
'loader': 'loader_qwenvl'
816+
'loader': 'loader_qwenvl',
817+
'license': 'Custom Non-Commercial',
796818
},
797819
'InternVL3 - 8b': {
798820
'precision': 'bfloat16',
@@ -802,7 +824,8 @@
802824
'cache_dir': 'OpenGVLab--InternVL3-8B',
803825
'requires_cuda': True,
804826
'vram': '8.2 GB',
805-
'loader': 'loader_internvl'
827+
'loader': 'loader_internvl',
828+
'license': 'apache-2.0',
806829
},
807830
'Qwen VL - 7b': {# transformers 4.41.2
808831
'precision': 'bfloat16',
@@ -812,7 +835,19 @@
812835
'cache_dir': 'Qwen--Qwen2.5-VL-7B-Instruct',
813836
'requires_cuda': True,
814837
'vram': '9.6 GB',
815-
'loader': 'loader_qwenvl'
838+
'loader': 'loader_qwenvl',
839+
'license': 'Custom Non-Commercial',
840+
},
841+
'GLM-4.1V-9B-Thinking': {# transformers 4.53.2
842+
'precision': 'bfloat16',
843+
'quant': '4-bit',
844+
'size': '9b',
845+
'repo_id': 'THUDM/GLM-4.1V-9B-Thinking',
846+
'cache_dir': 'THUDM--GLM-4.1V-9B-Thinking',
847+
'requires_cuda': True,
848+
'vram': '9.9 GB',
849+
'loader': 'loader_glmv4_thinking',
850+
'license': 'mit',
816851
},
817852
'THUDM glm4v - 9b': {# transformers 4.44.0
818853
'precision': 'bfloat16',
@@ -832,7 +867,8 @@
832867
'cache_dir': 'ctranslate2-4you--molmo-7B-D-0924-bnb-4bit',
833868
'requires_cuda': True,
834869
'vram': '10.5 GB',
835-
'loader': 'loader_molmo'
870+
'loader': 'loader_molmo',
871+
'license': 'apache-2.0',
836872
},
837873
'InternVL3 - 14b': {
838874
'precision': 'bfloat16',
@@ -842,7 +878,8 @@
842878
'cache_dir': 'OpenGVLab--InternVL3-14B',
843879
'requires_cuda': True,
844880
'vram': '12.6 GB',
845-
'loader': 'loader_internvl'
881+
'loader': 'loader_internvl',
882+
'license': 'apache-2.0',
846883
},
847884
}
848885

@@ -853,6 +890,7 @@
853890
'repo_id': 'ctranslate2-4you/GOT-OCR2_0-Customized',
854891
'cache_dir': 'ctranslate2-4you--GOT-OCR2_0-Customized',
855892
'requires_cuda': True,
893+
'license': 'apache-2.0',
856894
},
857895
}
858896

@@ -865,6 +903,7 @@
865903
"vram": "2GB",
866904
"precision": "float32",
867905
"gated": False,
906+
'license': 'apache-2.0',
868907
"allow_patterns": [
869908
"voices/**",
870909
"config.json",
@@ -883,6 +922,7 @@
883922
"vram": "4GB",
884923
"precision": "float32",
885924
"gated": False,
925+
'license': 'mit',
886926
"allow_patterns": [
887927
"voices/**",
888928
"config.json",
@@ -909,6 +949,7 @@
909949
"vram": "4GB",
910950
"precision": "float32",
911951
"gated": False,
952+
'license': 'mit',
912953
"allow_patterns": [
913954
"voices/**",
914955
"config.json",
@@ -935,6 +976,7 @@
935976
"vram": "4GB",
936977
"precision": "fp32",
937978
"gated": False,
979+
'license': 'mit',
938980
"allow_patterns": [
939981
"voices/**",
940982
"config.json",
@@ -961,6 +1003,7 @@
9611003
"vram": "4GB",
9621004
"precision": "fp32",
9631005
"gated": False,
1006+
'license': 'CCA Non-Commercial 4.0',
9641007
"allow_patterns": [
9651008
"asset/**",
9661009
"config/**",
@@ -977,15 +1020,6 @@
9771020
}
9781021

9791022
JEEVES_MODELS = {
980-
"Exaone - 2.4b": {
981-
"original_repo": "LGAI-EXAONE/EXAONE-3.5-2.4B-Instruct",
982-
"repo": "ctranslate2-4you/EXAONE-3.5-2.4B-Instruct-ct2-int8",
983-
"folder_name": "ctranslate2-4you--EXAONE-3.5-2.4B-Instruct-Llamafied-ct2-int8",
984-
"prompt_format": """[|system|]{jeeves_system_message}[|endofturn|]
985-
[|user|]{user_message}
986-
[|endofturn|]
987-
[|assistant|]"""
988-
},
9891023
"Llama - 3b": {
9901024
"original_repo": "meta-llama/Llama-3.2-3B-Instruct",
9911025
"repo": "ctranslate2-4you/Llama-3.2-3B-Instruct-ct2-int8",
@@ -1016,15 +1050,6 @@
10161050
"folder_name": "ctranslate2-4you--h2o-danube3.1-4b-chat-ct2-int8",
10171051
"prompt_format": """<|system|>{jeeves_system_message}</s><|prompt|>{user_message}</s><|answer|>"""
10181052
},
1019-
"Exaone - 7.8b": {
1020-
"original_repo": "LGAI-EXAONE/EXAONE-3.5-7.8B-Instruct",
1021-
"repo": "ctranslate2-4you/EXAONE-3.5-7.8B-Instruct-ct2-int8",
1022-
"folder_name": "ctranslate2-4you--EXAONE-3.5-7.8B-Instruct-Llamafied-ct2-int8",
1023-
"prompt_format": """[|system|]{jeeves_system_message}[|endofturn|]
1024-
[|user|]{user_message}
1025-
[|endofturn|]
1026-
[|assistant|]"""
1027-
},
10281053
}
10291054

10301055
WHISPER_SPEECH_MODELS = {

0 commit comments

Comments
 (0)