Skip to content

[docs] deploying#43241

Merged
stevhliu merged 3 commits intohuggingface:mainfrom
stevhliu:deploy
Feb 5, 2026
Merged

[docs] deploying#43241
stevhliu merged 3 commits intohuggingface:mainfrom
stevhliu:deploy

Conversation

@stevhliu
Copy link
Member

adds ecosystem integration docs for deploying with Candle, ExecuTorch, and MLX

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.


-->

# Candle
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ivarflakstad, would you mind reviewing the candle integration doc please? the goal is to explain and demonstrate how candle uses Transformers

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!
The docs (https://huggingface.github.io/candle) are very outdated at this point though.
Much of the information is still correct, but still I'd rather we directed users to the candle readme.


-->

# MLX
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pcuenca, would you mind reviewing the MLX integration doc please? the goal is to explain and demonstrate how MLX uses Transformers

@stevhliu stevhliu requested a review from LysandreJik January 13, 2026 02:27
Copy link
Member

@pcuenca pcuenca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Took a quick look at the MLX section, made a few comments and suggested to add the MLX -> transformers integration, but found some problems while testing; will take a deeper look.

I'll review the rest of the sections later.

)
print(output)
```

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Conversely, you can also load and run MLX-converted weights in Transformers, potentially on different platforms:
```py
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "pcuenq/tiny-llama-chat-mlx"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="cuda:0")
messages = [
{"role": "user", "content": "What is the capital of France?"},
]
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(inputs["input_ids"].to(model.device), do_sample=False, max_new_tokens=100)
print(tokenizer.decode(outputs[0].to("cpu")))

Heads up: we may want to skip this for now as I'm finding friction finding checkpoints that work - incompatible quants or weight shapes. Will look into it a bit.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GitHub got confused with the nested quotes.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey @pcuenca, lmk if its ok to skip this example for now so we can merge this. happy to follow up on this in a future PR :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @stevhliu, sorry I dropped the ball here! Yes, let's skip for now and get this out!

Copy link
Member

@LysandreJik LysandreJik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool thank you! cc @ArthurZucker on the Executorch part

@stevhliu stevhliu merged commit b92f8ff into huggingface:main Feb 5, 2026
15 checks passed
@stevhliu stevhliu deleted the deploy branch February 5, 2026 16:36
jiosephlee pushed a commit to jiosephlee/transformers_latest that referenced this pull request Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants