Instructions to use MentaCapture/qmodel with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MentaCapture/qmodel with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="MentaCapture/qmodel", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("MentaCapture/qmodel", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use MentaCapture/qmodel with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MentaCapture/qmodel" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MentaCapture/qmodel", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/MentaCapture/qmodel
- SGLang
How to use MentaCapture/qmodel 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 "MentaCapture/qmodel" \ --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": "MentaCapture/qmodel", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "MentaCapture/qmodel" \ --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": "MentaCapture/qmodel", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use MentaCapture/qmodel with Docker Model Runner:
docker model run hf.co/MentaCapture/qmodel
File size: 3,092 Bytes
7ac1039 | 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 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | {
"_name_or_path": "/home/azureuser/phi4/qwen_works/Speech-to-Text-Training/MODELS/Qwen-Nahin-3-6/checkpoint-201000",
"architectures": [
"Qwen2MMForCausalLM"
],
"attention_bias": false,
"attention_dropout": 0.0,
"audio_processor": {
"config": {
"activation": "swish",
"activation_checkpointing": {
"interval": 1,
"module": "transformer",
"offload": false
},
"attention_dim": 1024,
"attention_heads": 16,
"batch_norm": false,
"bias_in_glu": true,
"causal": true,
"chunk_size": -1,
"cnn_layer_norm": true,
"conv_activation": "swish",
"conv_glu_type": "swish",
"depthwise_multiplier": 1,
"depthwise_seperable_out_channel": 1024,
"dropout_rate": 0.0,
"encoder_embedding_config": {
"input_size": 80
},
"ext_pw_kernel_size": 1,
"ext_pw_out_channel": 1024,
"input_layer": "nemo_conv",
"input_size": 80,
"kernel_size": 3,
"left_chunk": 18,
"linear_units": 1536,
"nemo_conv_settings": {
"conv_channels": 1024
},
"num_blocks": 24,
"relative_attention_bias_args": {
"t5_bias_max_distance": 500,
"type": "t5"
},
"time_reduction": 8
},
"name": "cascades"
},
"auto_map": {
"AutoConfig": "configuration_qwen2mm.Qwen2MMConfig",
"AutoModelForCausalLM": "modeling_phi4mm.Qwen2MMForCausalLM",
"AutoTokenizer": "./"
},
"bos_token_id": 151644,
"embd_layer": {
"audio_embd_layer": {
"compression_rate": 8,
"downsample_rate": 1,
"embedding_cls": "audio",
"enable_gradient_checkpointing": true,
"projection_cls": "mlp",
"use_conv_downsample": false,
"use_qformer": false
},
"embedding_cls": "image_audio",
"image_embd_layer": {
"crop_size": 448,
"embedding_cls": "tune_image",
"enable_gradient_checkpointing": true,
"hd_transform_order": "sub_glb",
"image_token_compression_cls": "avg_pool_2d",
"projection_cls": "mlp",
"use_hd_transform": true,
"with_learnable_separator": true
}
},
"eos_token_id": 151645,
"hidden_act": "silu",
"hidden_size": 896,
"initializer_range": 0.02,
"intermediate_size": 4864,
"max_position_embeddings": 131072,
"max_window_layers": 24,
"model_type": "qwen2-mm",
"num_attention_heads": 14,
"num_hidden_layers": 24,
"num_key_value_heads": 2,
"pad_token_id": 151643,
"rms_norm_eps": 1e-06,
"rope_scaling": null,
"rope_theta": 1000000.0,
"sliding_window": null,
"speech_lora": {
"dp": 0.01,
"layer": "((layers.*self_attn\\.(qkv|o)_proj)|(layers.*mlp\\.(gate_up|down)_proj))",
"lora_alpha": 640,
"r": 320
},
"tie_word_embeddings": true,
"torch_dtype": "bfloat16",
"transformers_version": "4.48.3",
"use_cache": false,
"use_sliding_window": false,
"vision_lora": {
"dp": 0.0,
"layer": "layers.*((self_attn\\.(qkv_proj|o_proj))|(mlp\\.(gate_up|down)_proj))",
"lora_alpha": 512,
"r": 256
},
"vocab_size": 194498
}
|