mirror of
https://github.com/mudler/LocalAI.git
synced 2025-05-28 14:35:00 +00:00
feat: add /models/apply endpoint to prepare models (#286)
This commit is contained in:
parent
5617e50ebc
commit
cc9aa9eb3f
23 changed files with 556 additions and 33 deletions
1
tests/models_fixtures/completion.tmpl
Normal file
1
tests/models_fixtures/completion.tmpl
Normal file
|
@ -0,0 +1 @@
|
|||
{{.Input}}
|
32
tests/models_fixtures/config.yaml
Normal file
32
tests/models_fixtures/config.yaml
Normal file
|
@ -0,0 +1,32 @@
|
|||
- name: list1
|
||||
parameters:
|
||||
model: testmodel
|
||||
top_p: 80
|
||||
top_k: 0.9
|
||||
temperature: 0.1
|
||||
context_size: 10
|
||||
stopwords:
|
||||
- "HUMAN:"
|
||||
- "### Response:"
|
||||
roles:
|
||||
user: "HUMAN:"
|
||||
system: "GPT:"
|
||||
template:
|
||||
completion: completion
|
||||
chat: ggml-gpt4all-j
|
||||
- name: list2
|
||||
parameters:
|
||||
top_p: 80
|
||||
top_k: 0.9
|
||||
temperature: 0.1
|
||||
model: testmodel
|
||||
context_size: 10
|
||||
stopwords:
|
||||
- "HUMAN:"
|
||||
- "### Response:"
|
||||
roles:
|
||||
user: "HUMAN:"
|
||||
system: "GPT:"
|
||||
template:
|
||||
completion: completion
|
||||
chat: ggml-gpt4all-j
|
6
tests/models_fixtures/embeddings.yaml
Normal file
6
tests/models_fixtures/embeddings.yaml
Normal file
|
@ -0,0 +1,6 @@
|
|||
name: text-embedding-ada-002
|
||||
parameters:
|
||||
model: bert
|
||||
threads: 14
|
||||
backend: bert-embeddings
|
||||
embeddings: true
|
4
tests/models_fixtures/ggml-gpt4all-j.tmpl
Normal file
4
tests/models_fixtures/ggml-gpt4all-j.tmpl
Normal file
|
@ -0,0 +1,4 @@
|
|||
The prompt below is a question to answer, a task to complete, or a conversation to respond to; decide which and write an appropriate response.
|
||||
### Prompt:
|
||||
{{.Input}}
|
||||
### Response:
|
16
tests/models_fixtures/gpt4.yaml
Normal file
16
tests/models_fixtures/gpt4.yaml
Normal file
|
@ -0,0 +1,16 @@
|
|||
name: gpt4all
|
||||
parameters:
|
||||
model: testmodel
|
||||
top_p: 80
|
||||
top_k: 0.9
|
||||
temperature: 0.1
|
||||
context_size: 10
|
||||
stopwords:
|
||||
- "HUMAN:"
|
||||
- "### Response:"
|
||||
roles:
|
||||
user: "HUMAN:"
|
||||
system: "GPT:"
|
||||
template:
|
||||
completion: completion
|
||||
chat: ggml-gpt4all-j
|
16
tests/models_fixtures/gpt4_2.yaml
Normal file
16
tests/models_fixtures/gpt4_2.yaml
Normal file
|
@ -0,0 +1,16 @@
|
|||
name: gpt4all-2
|
||||
parameters:
|
||||
model: testmodel
|
||||
top_p: 80
|
||||
top_k: 0.9
|
||||
temperature: 0.1
|
||||
context_size: 10
|
||||
stopwords:
|
||||
- "HUMAN:"
|
||||
- "### Response:"
|
||||
roles:
|
||||
user: "HUMAN:"
|
||||
system: "GPT:"
|
||||
template:
|
||||
completion: completion
|
||||
chat: ggml-gpt4all-j
|
19
tests/models_fixtures/rwkv.yaml
Normal file
19
tests/models_fixtures/rwkv.yaml
Normal file
|
@ -0,0 +1,19 @@
|
|||
name: rwkv_test
|
||||
parameters:
|
||||
model: rwkv
|
||||
top_k: 80
|
||||
temperature: 0.9
|
||||
max_tokens: 100
|
||||
top_p: 0.8
|
||||
context_size: 1024
|
||||
threads: 14
|
||||
backend: "rwkv"
|
||||
cutwords:
|
||||
- "Bob:.*"
|
||||
roles:
|
||||
user: "Bob:"
|
||||
system: "Alice:"
|
||||
assistant: "Alice:"
|
||||
template:
|
||||
completion: rwkv_completion
|
||||
chat: rwkv_chat
|
13
tests/models_fixtures/rwkv_chat.tmpl
Normal file
13
tests/models_fixtures/rwkv_chat.tmpl
Normal file
|
@ -0,0 +1,13 @@
|
|||
The following is a verbose detailed conversation between Bob and a woman, Alice. Alice is intelligent, friendly and likeable. Alice is likely to agree with Bob.
|
||||
|
||||
Bob: Hello Alice, how are you doing?
|
||||
|
||||
Alice: Hi Bob! Thanks, I'm fine. What about you?
|
||||
|
||||
Bob: I am very good! It's nice to see you. Would you mind me chatting with you for a while?
|
||||
|
||||
Alice: Not at all! I'm listening.
|
||||
|
||||
{{.Input}}
|
||||
|
||||
Alice:
|
1
tests/models_fixtures/rwkv_completion.tmpl
Normal file
1
tests/models_fixtures/rwkv_completion.tmpl
Normal file
|
@ -0,0 +1 @@
|
|||
Complete the following sentence: {{.Input}}
|
4
tests/models_fixtures/whisper.yaml
Normal file
4
tests/models_fixtures/whisper.yaml
Normal file
|
@ -0,0 +1,4 @@
|
|||
name: whisper-1
|
||||
backend: whisper
|
||||
parameters:
|
||||
model: whisper-en
|
Loading…
Add table
Add a link
Reference in a new issue