From ollama to transformer.AutoModelForCausalLM #35

Closed
opened 2026-02-15 16:27:36 -05:00 by yindo · 1 comment
Owner

Originally created by @Demirrr on GitHub (Feb 20, 2024).

Dear all,

Thank you for ollama-python.

I was wondering whether it would be possible to create transformers.AutoModelForCausalLM from ollama, e.g.,

import ollama
model, tokenizer = ollama.from('mixtral:8x7b ')

where

  • model is an instance of transformers.AutoModelForCausalLM
  • tokenizer is an instance of transformers.AutoTokenizer
Originally created by @Demirrr on GitHub (Feb 20, 2024). Dear all, Thank you for ollama-python. I was wondering whether it would be possible to `create transformers.AutoModelForCausalLM` from ollama, e.g., ```python import ollama model, tokenizer = ollama.from('mixtral:8x7b ') ``` where + model is an instance of `transformers.AutoModelForCausalLM` + tokenizer is an instance of `transformers.AutoTokenizer`
yindo closed this issue 2026-02-15 16:27:37 -05:00
Author
Owner

@mxyng commented on GitHub (Feb 23, 2024):

It's not (currently) possible to convert an ollama model back into a transformers model

@mxyng commented on GitHub (Feb 23, 2024): It's not (currently) possible to convert an ollama model back into a transformers model
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ollama/ollama-python#35