Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing

  • Log In
  • Sign Up

radical-ai
/
MATRIX-PT

Image-Text-to-Text
PEFT
Safetensors
Transformers
English
lora
qwen2_vl
multimodal
conversational
Model card Files Files and versions
xet
Community

Instructions to use radical-ai/MATRIX-PT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • PEFT

    How to use radical-ai/MATRIX-PT with PEFT:

    from peft import PeftModel
    from transformers import AutoModelForCausalLM
    
    base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2-VL-7B")
    model = PeftModel.from_pretrained(base_model, "radical-ai/MATRIX-PT")
  • Transformers

    How to use radical-ai/MATRIX-PT with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("image-text-to-text", model="radical-ai/MATRIX-PT")
    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 AutoModel
    model = AutoModel.from_pretrained("radical-ai/MATRIX-PT", dtype="auto")
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps
  • vLLM

    How to use radical-ai/MATRIX-PT with vLLM:

    Install from pip and serve model
    # Install vLLM from pip:
    pip install vllm
    # Start the vLLM server:
    vllm serve "radical-ai/MATRIX-PT"
    # Call the server using curl (OpenAI-compatible API):
    curl -X POST "http://localhost:8000/v1/chat/completions" \
    	-H "Content-Type: application/json" \
    	--data '{
    		"model": "radical-ai/MATRIX-PT",
    		"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/radical-ai/MATRIX-PT
  • SGLang

    How to use radical-ai/MATRIX-PT 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 "radical-ai/MATRIX-PT" \
        --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": "radical-ai/MATRIX-PT",
    		"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 "radical-ai/MATRIX-PT" \
            --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": "radical-ai/MATRIX-PT",
    		"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 radical-ai/MATRIX-PT with Docker Model Runner:

    docker model run hf.co/radical-ai/MATRIX-PT
MATRIX-PT
Ctrl+K
Ctrl+K
  • 1 contributor
History: 21 commits
dmcgrath19's picture
dmcgrath19
Update README.md
6ff10b1 verified 3 months ago
  • .gitattributes
    1.57 kB
    Upload MATRIX-PT LoRA adapter (latest) 3 months ago
  • README.md
    10.6 kB
    Update README.md 3 months ago
  • adapter_config.json
    1.05 kB
    Upload MATRIX-PT LoRA adapter (latest) 3 months ago
  • adapter_model.safetensors
    2.21 GB
    xet
    Upload MATRIX-PT LoRA adapter (latest) 3 months ago
  • chat_template.jinja
    391 Bytes
    Upload MATRIX-PT LoRA adapter (latest) 3 months ago
  • tokenizer.json
    11.4 MB
    xet
    Upload MATRIX-PT LoRA adapter (latest) 3 months ago
  • tokenizer_config.json
    731 Bytes
    Upload MATRIX-PT LoRA adapter (latest) 3 months ago