Fixes from runpod

This commit is contained in:
2025-05-06 20:35:30 +02:00
parent c41a86a00a
commit f8365ef698

View File

@@ -203,6 +203,17 @@
"tokenizer = AutoTokenizer.from_pretrained(model_id, token=os.environ['SIA_HF_API_KEY'])" "tokenizer = AutoTokenizer.from_pretrained(model_id, token=os.environ['SIA_HF_API_KEY'])"
] ]
}, },
{
"cell_type": "code",
"execution_count": null,
"id": "4e91a67e",
"metadata": {},
"outputs": [],
"source": [
"# Save tokenizer first\n",
"tokenizer.save_pretrained(output_dir+\"_tokenizer\")"
]
},
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,
@@ -323,17 +334,6 @@
"trainer.train()" "trainer.train()"
] ]
}, },
{
"cell_type": "code",
"execution_count": null,
"id": "4e91a67e",
"metadata": {},
"outputs": [],
"source": [
"# Save tokenizer first\n",
"tokenizer.save_pretrained(output_dir+\"_tokenizer\")"
]
},
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,
@@ -408,6 +408,16 @@
")" ")"
] ]
}, },
{
"cell_type": "code",
"execution_count": null,
"id": "6930cf5d",
"metadata": {},
"outputs": [],
"source": [
"!cp /root/models/gemma3_12b_tokenizer/* /root/models/gemma3_12b_merged/"
]
},
{ {
"cell_type": "markdown", "cell_type": "markdown",
"id": "2fdfdfba", "id": "2fdfdfba",
@@ -511,6 +521,7 @@
"outputs": [], "outputs": [],
"source": [ "source": [
"%%bash\n", "%%bash\n",
"cd /usr/local/lib/\n",
"llama-cli -m /root/models/gemma3_1b.gguf -p \"hi\"" "llama-cli -m /root/models/gemma3_1b.gguf -p \"hi\""
] ]
}, },
@@ -672,6 +683,8 @@
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
"%cd /usr/local/lib/\n",
"\n",
"from llama_cpp import Llama\n", "from llama_cpp import Llama\n",
"\n", "\n",
"# Load the model\n", "# Load the model\n",