Instructions to use microsoft/Fara1.5-27B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use microsoft/Fara1.5-27B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="microsoft/Fara1.5-27B") 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 AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("microsoft/Fara1.5-27B") model = AutoModelForMultimodalLM.from_pretrained("microsoft/Fara1.5-27B", device_map="auto") 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 = processor.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(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use microsoft/Fara1.5-27B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "microsoft/Fara1.5-27B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "microsoft/Fara1.5-27B", "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/microsoft/Fara1.5-27B
- SGLang
How to use microsoft/Fara1.5-27B 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 "microsoft/Fara1.5-27B" \ --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": "microsoft/Fara1.5-27B", "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 "microsoft/Fara1.5-27B" \ --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": "microsoft/Fara1.5-27B", "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 microsoft/Fara1.5-27B with Docker Model Runner:
docker model run hf.co/microsoft/Fara1.5-27B
Serving Fara with llama.cpp: use --reasoning-format none, or agent harnesses get empty content
If you serve this model with llama-server and consume it from an agent harness (e.g. Magentic-UI's Fara web surfer), tool parsing can fail on every call, with the harness seeing an empty assistant message.
What happens: Fara writes its thoughts as plain text followed by a <tool_call>...</tool_call> block. It emits a <think> opening tag but never a closing </think>. With llama-server's default reasoning extraction (--reasoning-format unset/auto), the parser treats everything after <think> as reasoning β so the entire output (thoughts + tool call) lands in reasoning_content, and message.content comes back as "". Any client that reads only content (the OpenAI-standard field) gets an empty string. In Magentic-UI this surfaces as list index out of range. Retrying (1/3)... on every task.
Repro: identical chat completion request, same model (27B, llama.cpp b10107):
- default reasoning format β
content: "", thoughts +<tool_call>block in the reasoning field,finish_reason: stop --reasoning-format noneβ full raw output incontent, parses fine
Fix: launch llama-server with --reasoning-format none. If you have a router/proxy in front doing its own reasoning extraction, disable it there too. Note the raw output then starts with a stray unclosed <think> tag β harmless for parsers that split on <tool_call>, just cosmetic in displayed thoughts.
Thank you for bringing this to our attention. Would you mind posting this as an issue on the Fara1.5 github repo so we can mention this in the hosting instructions? Thank you!
Sure, here it is: https://github.com/microsoft/fara/issues/82
Thanks for the quick follow-up, and great work on Fara1.5, it's been really impressive to run locally.