Upload convert_grpo_to_gguf.py with huggingface_hub
Browse files- convert_grpo_to_gguf.py +6 -1
convert_grpo_to_gguf.py
CHANGED
|
@@ -119,8 +119,13 @@ print(f" Q8_0: {size_mb:.1f} MB")
|
|
| 119 |
|
| 120 |
# Step 9: Upload
|
| 121 |
print("\n Step 8: Uploading to Hub...")
|
|
|
|
| 122 |
hf_token = os.environ.get("HF_TOKEN")
|
| 123 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 124 |
api.create_repo(repo_id=OUTPUT_REPO, repo_type="model", exist_ok=True)
|
| 125 |
print(" Repository ready")
|
| 126 |
|
|
|
|
| 119 |
|
| 120 |
# Step 9: Upload
|
| 121 |
print("\n Step 8: Uploading to Hub...")
|
| 122 |
+
from huggingface_hub import login
|
| 123 |
hf_token = os.environ.get("HF_TOKEN")
|
| 124 |
+
print(f" Token present: {bool(hf_token)}")
|
| 125 |
+
if hf_token:
|
| 126 |
+
login(token=hf_token)
|
| 127 |
+
print(" Logged in successfully")
|
| 128 |
+
api = HfApi()
|
| 129 |
api.create_repo(repo_id=OUTPUT_REPO, repo_type="model", exist_ok=True)
|
| 130 |
print(" Repository ready")
|
| 131 |
|