Instructions to use glancm/llama-2-7b-codeAlpacaMG with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use glancm/llama-2-7b-codeAlpacaMG with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("NousResearch/llama-2-7b-chat-hf") model = PeftModel.from_pretrained(base_model, "glancm/llama-2-7b-codeAlpacaMG") - Notebooks
- Google Colab
- Kaggle
Download pushmg.py from glancm/llama-2-7b-codeAlpacaMG: direct link, hf CLI and curl.
- Browser
- Download file 257 Bytes
-
https://huggingface.co/glancm/llama-2-7b-codeAlpacaMG/resolve/main/pushmg.py
- Command line
-
hf download hf://glancm/llama-2-7b-codeAlpacaMG/pushmg.py
-
curl -L -o pushmg.py https://huggingface.co/glancm/llama-2-7b-codeAlpacaMG/resolve/main/pushmg.py
257 Bytes
| from huggingface_hub import HfApi | |
| api = HfApi() | |
| api.upload_folder( | |
| folder_path="/home/reverse_user/llama-2-7b-codeAlpaca", # Replace with actual path | |
| repo_id="glancm/llama-2-7b-codeAlpacaMG", # Replace with your repo name | |
| repo_type="model" | |
| ) | |