llama.swiftui : add more models

This commit is contained in:
Georgi Gerganov 2023-12-18 20:05:12 +02:00
parent b9e74f9bca
commit 6ff39b129d
No known key found for this signature in database
GPG Key ID: 449E073F9DC10735
2 changed files with 30 additions and 3 deletions

View File

@ -203,7 +203,7 @@ actor LlamaContext {
var pp_std: Double = 0 var pp_std: Double = 0
var tg_std: Double = 0 var tg_std: Double = 0
for r in 0..<nr { for _ in 0..<nr {
// bench prompt processing // bench prompt processing
llama_batch_clear(&batch) llama_batch_clear(&batch)

View File

@ -75,21 +75,48 @@ struct ContentView: View {
VStack { VStack {
DownloadButton( DownloadButton(
llamaState: llamaState, llamaState: llamaState,
modelName: "TinyLlama-1.1B (Q4_0)", modelName: "TinyLlama-1.1B (Q4_0, 0.6 GiB)",
modelUrl: "https://huggingface.co/TheBloke/TinyLlama-1.1B-1T-OpenOrca-GGUF/resolve/main/tinyllama-1.1b-1t-openorca.Q4_0.gguf?download=true", modelUrl: "https://huggingface.co/TheBloke/TinyLlama-1.1B-1T-OpenOrca-GGUF/resolve/main/tinyllama-1.1b-1t-openorca.Q4_0.gguf?download=true",
filename: "tinyllama-1.1b-1t-openorca.Q4_0.gguf" filename: "tinyllama-1.1b-1t-openorca.Q4_0.gguf"
) )
.font(.system(size: 12)) .font(.system(size: 12))
.padding(.top, 4) .padding(.top, 4)
.frame(maxWidth: .infinity, alignment: .leading)
DownloadButton( DownloadButton(
llamaState: llamaState, llamaState: llamaState,
modelName: "TinyLlama-1.1B (Q8_0)", modelName: "TinyLlama-1.1B (Q8_0, 1.1 GiB)",
modelUrl: "https://huggingface.co/TheBloke/TinyLlama-1.1B-1T-OpenOrca-GGUF/resolve/main/tinyllama-1.1b-1t-openorca.Q8_0.gguf?download=true", modelUrl: "https://huggingface.co/TheBloke/TinyLlama-1.1B-1T-OpenOrca-GGUF/resolve/main/tinyllama-1.1b-1t-openorca.Q8_0.gguf?download=true",
filename: "tinyllama-1.1b-1t-openorca.Q8_0.gguf" filename: "tinyllama-1.1b-1t-openorca.Q8_0.gguf"
) )
.font(.system(size: 12)) .font(.system(size: 12))
DownloadButton(
llamaState: llamaState,
modelName: "Phi-2.7B (Q4_0, 1.6 GiB)",
modelUrl: "https://huggingface.co/ggml-org/models/resolve/main/phi-2/ggml-model-q4_0.gguf?download=true",
filename: "phi-2-q4_0.gguf"
)
.font(.system(size: 12))
.frame(maxWidth: .infinity, alignment: .leading)
DownloadButton(
llamaState: llamaState,
modelName: "Phi-2.7B (Q8_0, 2.8 GiB)",
modelUrl: "https://huggingface.co/ggml-org/models/resolve/main/phi-2/ggml-model-q8_0.gguf?download=true",
filename: "phi-2-q8_0.gguf"
)
.font(.system(size: 12))
DownloadButton(
llamaState: llamaState,
modelName: "Mistral-7B-v0.1 (Q4_0, 3.8 GiB)",
modelUrl: "https://huggingface.co/TheBloke/Mistral-7B-v0.1-GGUF/resolve/main/mistral-7b-v0.1.Q4_0.gguf?download=true",
filename: "mistral-7b-v0.1.Q4_0.gguf"
)
.font(.system(size: 12))
.frame(maxWidth: .infinity, alignment: .leading)
Button("Clear downloaded models") { Button("Clear downloaded models") {
ContentView.cleanupModelCaches() ContentView.cleanupModelCaches()
llamaState.cacheCleared = true llamaState.cacheCleared = true