Skip to content

RAG deploymen #830

@gadieid

Description

@gadieid

Several Issues:
Enable a method to use without ollama docker since may interfere with running ollama instance (Changing port didn;t work, maybe need to change 11343 on docker as well, not only on host)
Add RAG models download options - each hugging face model used should be saved locally to enable easy solution for offline mode
Add offline mode - will not try to download from docker or huggingface but use local models

In ONLINE mode:
from transformers import AutoModel, AutoTokenizer

model_id = "bert-base-uncased" # Replace with your model's name

This pulls instantly from your local cache

model = AutoModel.from_pretrained(model_id)
tokenizer = AutoTokenizer.from_pretrained(model_id)

This saves a clean, standalone copy without symlinks

model.save_pretrained("./my_offline_model")
tokenizer.save_pretrained("./my_offline_model")

In OFFLINE mode:
from transformers import AutoModel, AutoTokenizer

Point to the local folder path

model = AutoModel.from_pretrained("./my_offline_model", local_files_only=True)
tokenizer = AutoTokenizer.from_pretrained("./my_offline_model", local_files_only=True)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions