CodeMind / models /phi2.Q /README.md
devjas1
(MODEL DOWNLOAD)[Add embeddinggemma-300m scrip//Run once to download]t: add embeddinggemma-300m model initialization
cdd329f
|
raw
history blame
1.94 kB

Download Models for CodeMind

You need to download compatible model files (such as phi-2.Q4_0.gguf) to use CodeMind locally. There are two main ways to obtain these models:


Option 1: Download via Hugging Face Web Interface

  1. Visit the Hugging Face model page.
  2. Locate the desired file (e.g., phi-2.Q4_0.gguf) in the "Files and versions" section.
  3. Click the file name to download it directly.
  4. Move the downloaded file into your ./models directory within your CodeMind repository.

HuggingFace


Option 2: Download Using Python and huggingface_hub

If you prefer automation, you can use the huggingface_hub Python library:

1. Install the library

pip install huggingface_hub

2. Download the model file

Create a Python script (e.g., download_model.py) with the following code:

from huggingface_hub import hf_hub_download

repo_id = "TheBloke/phi-2-GGUF"  # Change if using a different repo
filename = "phi-2.Q4_0.gguf"
local_dir = "./models"

hf_hub_download(repo_id=repo_id, filename=filename, local_dir=local_dir)
print(f"Downloaded {filename} to {local_dir}")
  • Replace repo_id and filename if you need a different model or file.
  • Make sure local_dir matches your desired storage location.

3. Run the script

python download_model.py

This will download the specified file into your models directory.


Notes

  • Always verify the model license and compatibility before use.
  • For other models, repeat the steps above with the appropriate repository and filename.
  • For more details, see the Hugging Face documentation.