128k Context
Collection
128 Extended Context Models • 4 items • Updated • 1
How to use LeroyDyer/Mixtral_AI_CyberVision with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("image-text-to-text", model="LeroyDyer/Mixtral_AI_CyberVision", trust_remote_code=True)
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 AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("LeroyDyer/Mixtral_AI_CyberVision", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained("LeroyDyer/Mixtral_AI_CyberVision", trust_remote_code=True)
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?"}
]
},
]
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
tokenize=True,
return_dict=True,
return_tensors="pt",
).to(model.device)
outputs = model.generate(**inputs, max_new_tokens=40)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))How to use LeroyDyer/Mixtral_AI_CyberVision with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "LeroyDyer/Mixtral_AI_CyberVision"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "LeroyDyer/Mixtral_AI_CyberVision",
"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 run hf.co/LeroyDyer/Mixtral_AI_CyberVision
How to use LeroyDyer/Mixtral_AI_CyberVision with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "LeroyDyer/Mixtral_AI_CyberVision" \
--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": "LeroyDyer/Mixtral_AI_CyberVision",
"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 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 "LeroyDyer/Mixtral_AI_CyberVision" \
--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": "LeroyDyer/Mixtral_AI_CyberVision",
"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"
}
}
]
}
]
}'How to use LeroyDyer/Mixtral_AI_CyberVision with Docker Model Runner:
docker model run hf.co/LeroyDyer/Mixtral_AI_CyberVision
This model is also a Vision model with 128k context window:
To be further refined! Working!
If you want to use vision functionality:
Make sure you are using the latest version of KoboldCpp.
To use the multimodal capabilities of this model, such as vision, you also need to load the specified mmproj file, you can get it here.
https://huggingface.co/LeroyDyer/Mixtral_AI_Vision_128k/blob/main/mmproj-model-f16.gguf
You can load the mmproj by using the corresponding section in the interface:
KoboldCpp now supports Vision via Multimodal Projectors (aka LLaVA), allowing it to perceive and react to images! Load a suitable --mmproj file or select it in the GUI launcher to use vision capabilities. (Not working on Vulkan)
Note: This is NOT limited to only LLaVA models, any compatible model of the same size and architecture can gain vision capabilities!
Simply grab a 200mb mmproj file for your architecture here,
https://huggingface.co/koboldcpp/mmproj
load it with --mmproj and stick it into your favorite compatible model, and it will be able to see images as well!
This model was merged using the linear merge method.
The following models were included in the merge:
The following YAML configuration was used to produce this model:
Base model
ChaoticNeutrals/Eris_PrimeV3-Vision-7B