Spaces:
Paused
Paused
Create train.sh
Browse files
train.sh
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
|
| 3 |
+
# Log in to Hugging Face (you'll need to enter a token the first time)
|
| 4 |
+
huggingface-cli login --token $HF_TOKEN
|
| 5 |
+
|
| 6 |
+
# Run AutoTrain on Llama 3.1
|
| 7 |
+
autotrain llm \
|
| 8 |
+
--train \
|
| 9 |
+
--model meta-llama/Meta-Llama-3-8B \
|
| 10 |
+
--data_path /app/news_data.csv \
|
| 11 |
+
--output_dir /app/model_output \
|
| 12 |
+
--epochs 3 \
|
| 13 |
+
--batch_size 2
|
| 14 |
+
|
| 15 |
+
# Push the trained model to Hugging Face Hub
|
| 16 |
+
autotrain llm \
|
| 17 |
+
--push_to_hub \
|
| 18 |
+
--model_dir /app/model_output \
|
| 19 |
+
--repo_name your_username/llama3-news-recommendation
|