Instructions to use q-future/co-instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use q-future/co-instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="q-future/co-instruct", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("q-future/co-instruct", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use q-future/co-instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "q-future/co-instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "q-future/co-instruct", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/q-future/co-instruct
- SGLang
How to use q-future/co-instruct 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 "q-future/co-instruct" \ --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": "q-future/co-instruct", "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 "q-future/co-instruct" \ --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": "q-future/co-instruct", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use q-future/co-instruct with Docker Model Runner:
docker model run hf.co/q-future/co-instruct
Commit History
-
Adding `safetensors` variant of this model (#1)
Verified signature- Adding `safetensors` variant of this model (d953ab951205466a75e66d602cff8edbc6715b53) Co-authored-by: Safetensors convertbot <SFconvertbot@users.noreply.huggingface.co>765f4a6
-
Update README.md
Verified signaturebc0349e
-
Update README.md
Verified signature7608953
-
Update README.md
Verified signature4fa45c3
-
Update README.md
Verified signature972f2c2
-
Update README.md
Verified signaturefb0edb1 -
Upload pytorch_model.bin.index.json with huggingface_hub
Verified signaturef094187 -
Upload pytorch_model-00003-of-00004.bin with huggingface_hub
Verified signaturea2e8816 -
Upload pytorch_model-00002-of-00004.bin with huggingface_hub
Verified signaturec931857 -
Upload pytorch_model-00001-of-00004.bin with huggingface_hub
Verified signatureaa55665 -
Upload pytorch_model-00004-of-00004.bin with huggingface_hub
Verified signature2d9ff37
-
Update README.md
Verified signature4aea171
-
Upload folder using huggingface_hub
Verified signaturebf10b2f -
Update README.md
Verified signature174048a
-
Upload config.json with huggingface_hub
Verified signature281b093 -
Upload folder using huggingface_hub
Verified signature7201ef4
-
Update README.md
Verified signature9dd6788 -
Update modeling_llama2.py
Verified signatureedd457f -
Update modeling_llama2.py
Verified signature1c087ef -
Update modeling_attn_mask_utils.py
Verified signature49932d2
-
Create README.md
Verified signature88d2311 -
Upload modeling_mplug_owl2.py with huggingface_hub
Verified signatureffa96e2 -
Upload modeling_mplug_owl2.py with huggingface_hub
Verified signaturef702052 -
Upload modeling_mplug_owl2.py with huggingface_hub
Verified signature573d097 -
Upload modeling_attn_mask_utils.py with huggingface_hub
Verified signature207050b -
Upload visual_encoder.py with huggingface_hub
Verified signatureb0368bf -
Upload modeling_attn_mask_utils.py with huggingface_hub
Verified signature2c7e7c0 -
Upload modeling_llama2.py with huggingface_hub
Verified signature2094a57 -
Upload modeling_mplug_owl2.py with huggingface_hub
Verified signature0f6277a -
Upload configuration_mplug_owl2.py with huggingface_hub
Verified signature659641f -
Update config.json
Verified signaturec6db862
-
Delete global_step3200
Verified signatureb60180c -
Upload folder using huggingface_hub
Verified signature380410c
-
Upload folder using huggingface_hub
796a500 -
Upload preprocessor_config.json with huggingface_hub
5abe01a -
initial commit
dab39f9