Repository navigation
docs: improve documentation on exporting models from Colab - #4247
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a crucial new documentation guide aimed at helping users effectively persist and export their fine-tuned models from Google Colab environments. Recognizing the ephemeral nature of Colab instances, the guide provides detailed, step-by-step instructions and best practices for various export scenarios, ensuring users can reliably save their work and integrate it with other platforms or local inference tools. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a comprehensive and well-structured guide on exporting models from Google Colab. The new documentation is a valuable addition, covering various methods and common troubleshooting steps. The changes are clear and the guide is easy to follow. I've provided a few minor suggestions to improve clarity and consistency in the new documentation file.
| # Create a Modelfile | ||
| echo 'FROM ./my_model_gguf/<base-model-name>.Q4_K_M.gguf' > Modelfile |
There was a problem hiding this comment.
The placeholder <base-model-name> can be confusing. It refers to the filename of the GGUF file (without the quantization suffix), which is derived from the original model's name. Using a more descriptive placeholder like your-model-name and adding a comment to guide the user would improve clarity.
| # Create a Modelfile | |
| echo 'FROM ./my_model_gguf/<base-model-name>.Q4_K_M.gguf' > Modelfile | |
| # Create a Modelfile (replace your-model-name with your actual model name) | |
| echo 'FROM ./my_model_gguf/your-model-name.Q4_K_M.gguf' > Modelfile |
|
|
||
| ```python | ||
| from google.colab import files | ||
| files.download("my_model_gguf/<model-name>.Q4_K_M.gguf") |
There was a problem hiding this comment.
For consistency with other parts of the document (like the Ollama section), consider using a more descriptive placeholder like your-model-name instead of <model-name>. This helps maintain a uniform and clear style throughout the guide.
| files.download("my_model_gguf/<model-name>.Q4_K_M.gguf") | |
| files.download("my_model_gguf/your-model-name.Q4_K_M.gguf") |
| # Split into 2 GB chunks | ||
| subprocess.run([ | ||
| "split", "-b", "2G", | ||
| "my_model_gguf/<model-name>.Q4_K_M.gguf", |
There was a problem hiding this comment.
To maintain consistency across the document's examples, it would be beneficial to use the same placeholder format. Replacing <model-name> with your-model-name would align this example with others and improve overall clarity.
| "my_model_gguf/<model-name>.Q4_K_M.gguf", | |
| "my_model_gguf/your-model-name.Q4_K_M.gguf", |
| system and cached model weights. Saving a merged 16-bit model can temporarily | ||
| require 2x the model size in disk space. | ||
|
|
||
| **Solutions:** |
There was a problem hiding this comment.
For better document structure and consistency, it's recommended to use Markdown headings (e.g., ###) instead of bolded text for section titles like 'Solutions'. This improves readability and allows for easier navigation if a table of contents is generated.
| **Solutions:** | |
| ### Solutions |
| Large model exports can take 10-30 minutes. Colab may disconnect during this | ||
| time. | ||
|
|
||
| **Solutions:** |
| GGUF conversion requires merging LoRA into 16-bit first, which temporarily uses | ||
| significant memory. | ||
|
|
||
| **Solutions:** |
|
Looks good -- glad the guide is making it in. I noticed the GGUF section covers |
888c08f to
405e038
Compare
This comment was marked as low quality.
This comment was marked as low quality.
1 similar comment
This comment was marked as low quality.
This comment was marked as low quality.
Squashed from 3 commit(s); reduced to an empty diff so the contribution is credited on merge.
405e038 to
a081e3f
Compare
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Thanks for the PR! Sorry on the delay as well - we superseded the PR, but we merged the PR for now - appreciate the contribution! |
Empty commit crediting the contribution; the change was superseded on main.
Replacement for #4184 due to Studio rebasing
Summary
docs/exporting_models_from_colab.mdcovering all model export methods from Google ColabCloses #1615
What's covered