Conversation
|
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 |
There was a problem hiding this comment.
@ivarflakstad, would you mind reviewing the candle integration doc please? the goal is to explain and demonstrate how candle uses Transformers
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
@pcuenca, would you mind reviewing the MLX integration doc please? the goal is to explain and demonstrate how MLX uses Transformers
pcuenca
left a comment
There was a problem hiding this comment.
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) | ||
| ``` | ||
|
|
There was a problem hiding this comment.
| 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.
There was a problem hiding this comment.
GitHub got confused with the nested quotes.
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
Hi @stevhliu, sorry I dropped the ball here! Yes, let's skip for now and get this out!
LysandreJik
left a comment
There was a problem hiding this comment.
Cool thank you! cc @ArthurZucker on the Executorch part
* fix * feedback * fix
adds ecosystem integration docs for deploying with Candle, ExecuTorch, and MLX