writeChatMLClassifierModel writes a classifier model YAML that mirrors the live arch-router-1.5b.yaml shipped at volumes/models/arch-router-1.5b.yaml: ChatML chat + chat_message templates, score usecase, <|im_end|> first in stopwords.
(modelDir, name string)
| 475 | // volumes/models/arch-router-1.5b.yaml: ChatML chat + chat_message |
| 476 | // templates, score usecase, <|im_end|> first in stopwords. |
| 477 | func writeChatMLClassifierModel(modelDir, name string) { |
| 478 | body := `name: ` + name + ` |
| 479 | backend: llama-cpp |
| 480 | known_usecases: |
| 481 | - score |
| 482 | stopwords: |
| 483 | - <|im_end|> |
| 484 | - <|endoftext|> |
| 485 | template: |
| 486 | chat: | |
| 487 | {{.Input -}} |
| 488 | <|im_start|>assistant |
| 489 | chat_message: | |
| 490 | <|im_start|>{{ .RoleName }} |
| 491 | {{- if .Content }} |
| 492 | {{ .Content }} |
| 493 | {{- end }}<|im_end|> |
| 494 | ` |
| 495 | Expect(os.WriteFile(filepath.Join(modelDir, name+".yaml"), []byte(body), 0o644)).To(Succeed()) |
| 496 | } |
| 497 | |
| 498 | // writeLlama3StyleClassifierModel writes a classifier model mirroring |
| 499 | // gallery/llama3-instruct.yaml — stopwords defensively list <|im_end|> |