From 0d7a07b32c2606b04ec75bda44a1e167b1444f9d Mon Sep 17 00:00:00 2001 From: rinechran Date: Thu, 15 May 2025 16:34:58 +0900 Subject: [PATCH 1/2] feat : windows build ps1 --- example/build_and_run.ps1 | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 example/build_and_run.ps1 diff --git a/example/build_and_run.ps1 b/example/build_and_run.ps1 new file mode 100644 index 0000000..9e591a1 --- /dev/null +++ b/example/build_and_run.ps1 @@ -0,0 +1,32 @@ +$ErrorActionPreference = "Stop" + +# --- Build --- +New-Item -ItemType Directory -Force -Path "./build" | Out-Null +Push-Location ./build +cmake .. -DCMAKE_BUILD_TYPE=Release +cmake --build . +Pop-Location + +# --- Download example files --- +New-Item -ItemType Directory -Force -Path "./dist" | Out-Null +Push-Location ./dist + +if (-not (Test-Path "tokenizer.model")) { + Invoke-WebRequest -Uri "https://huggingface.co/lmsys/vicuna-7b-v1.5/resolve/main/tokenizer.model" -OutFile "tokenizer.model" +} + +if (-not (Test-Path "tokenizer.json")) { + Invoke-WebRequest -Uri "https://huggingface.co/togethercomputer/RedPajama-INCITE-Chat-3B-v1/resolve/main/tokenizer.json" -OutFile "tokenizer.json" +} + +if (-not (Test-Path "tokenizer_model")) { + Invoke-WebRequest -Uri "https://github.com/BBuf/run-rwkv-world-4-in-mlc-llm/releases/download/v1.0.0/tokenizer_model.zip" -OutFile "tokenizer_model.zip" + Expand-Archive -Path "tokenizer_model.zip" -DestinationPath . + Remove-Item "tokenizer_model.zip" +} + +Pop-Location + +# --- Run --- +Write-Host "---Running example----" +Start-Process -FilePath ".\build\Debug\example.exe" -Wait From 02c7b9162d36ded02a4251937a4077809cc12860 Mon Sep 17 00:00:00 2001 From: rinechran Date: Thu, 15 May 2025 16:36:18 +0900 Subject: [PATCH 2/2] feat : build_and_run update --- example/build_and_run.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/build_and_run.ps1 b/example/build_and_run.ps1 index 9e591a1..4e0773c 100644 --- a/example/build_and_run.ps1 +++ b/example/build_and_run.ps1 @@ -3,7 +3,7 @@ $ErrorActionPreference = "Stop" # --- Build --- New-Item -ItemType Directory -Force -Path "./build" | Out-Null Push-Location ./build -cmake .. -DCMAKE_BUILD_TYPE=Release +cmake .. cmake --build . Pop-Location