Skip to content

Commit c68907a

Browse files
authored
chore(models): add gpt-oss-20b (#5973)
Signed-off-by: Ettore Di Giacinto <[email protected]>
1 parent 9087ddc commit c68907a

File tree

2 files changed

+117
-0
lines changed

2 files changed

+117
-0
lines changed

gallery/harmony.yaml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
---
2+
name: "harmony"
3+
4+
config_file: |
5+
mmap: true
6+
backend: "llama-cpp"
7+
template:
8+
chat_message: |
9+
<|start|>{{ if .FunctionCall -}}functions.{{ .FunctionCall.Name }} to=assistant{{ else if eq .RoleName "assistant"}}<|channel|>final<|message|>{{else}}{{ .RoleName }}{{end}}<|message|>
10+
{{ if .Content -}}
11+
{{.Content }}
12+
{{ end -}}
13+
{{ if .FunctionCall -}}
14+
{{toJson .FunctionCall}}
15+
{{ end -}}<|end|>
16+
function: |
17+
<|im_start|>system
18+
You are a function calling AI model. You are provided with functions to execute. You may call one or more functions to assist with the user query. Don't make assumptions about what values to plug into functions. Here are the available tools:
19+
20+
<|start|>system<|message|>You are ChatGPT, a large language model trained by OpenAI.
21+
Knowledge cutoff: 2024-06
22+
Current date: {{ now | date }}
23+
24+
Reasoning: medium
25+
26+
# Tools
27+
28+
## functions
29+
30+
namespace functions {
31+
{{-range .Functions}}
32+
{{if .Description }}
33+
// {{ .Description }}
34+
{{- end }}
35+
{{- if and .Parameters.Properties (gt (len .Parameters.Properties) 0) }}
36+
type {{ .Name }} = (_: {
37+
{{- range $name, $prop := .Parameters.Properties }}
38+
{{- if $prop.Description }}
39+
// {{ $prop.Description }}
40+
{{- end }}
41+
{{ $name }}: {{ if gt (len $prop.Type) 1 }}{{ range $i, $t := $prop.Type }}{{ if $i }} | {{ end }}{{ $t }}{{ end }}{{ else }}{{ index $prop.Type 0 }}{{ end }},
42+
{{- end }}
43+
}) => any;
44+
{{- else }}
45+
type {{ .Function.Name }} = () => any;
46+
{{- end }}
47+
{{- end }}{{/* end of range .Functions */}}
48+
} // namespace functions
49+
50+
# Instructions
51+
52+
<|end|>
53+
{{.Input -}}
54+
<|start|>assistant
55+
chat: |
56+
<|start|>system<|message|>You are ChatGPT, a large language model trained by OpenAI.
57+
Knowledge cutoff: 2024-06
58+
Current date: {{ now | date }}
59+
60+
Reasoning: medium
61+
62+
# Instructions
63+
64+
<|end|>
65+
{{.Input -}}
66+
<|im_start|>assistant
67+
completion: |
68+
{{.Input}}
69+
context_size: 8192
70+
f16: true
71+
stopwords:
72+
- '<|im_end|>'
73+
- '<dummy32000>'
74+
- '</s>'
75+
- '<|endoftext|>'
76+
- '<|end|>s'

gallery/index.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,45 @@
11
---
2+
- &gptoss
3+
name: "gpt-oss-20b"
4+
url: "github:mudler/LocalAI/gallery/harmony.yaml@master"
5+
license: apache-2.0
6+
tags:
7+
- gguf
8+
- gpu
9+
- cpu
10+
- gguf
11+
- openai
12+
icon: https://raw.githubusercontent.com/openai/gpt-oss/main/docs/gpt-oss-20b.svg
13+
urls:
14+
- https://huggingface.co/openai/gpt-oss-20b
15+
- https://huggingface.co/ggml-org/gpt-oss-20b-GGUF
16+
description: |
17+
Welcome to the gpt-oss series, OpenAI’s open-weight models designed for powerful reasoning, agentic tasks, and versatile developer use cases.
18+
19+
We’re releasing two flavors of the open models:
20+
21+
gpt-oss-120b — for production, general purpose, high reasoning use cases that fits into a single H100 GPU (117B parameters with 5.1B active parameters)
22+
gpt-oss-20b — for lower latency, and local or specialized use cases (21B parameters with 3.6B active parameters)
23+
24+
Both models were trained on our harmony response format and should only be used with the harmony format as it will not work correctly otherwise.
25+
26+
This model card is dedicated to the smaller gpt-oss-20b model. Check out gpt-oss-120b for the larger model.
27+
28+
Highlights
29+
30+
Permissive Apache 2.0 license: Build freely without copyleft restrictions or patent risk—ideal for experimentation, customization, and commercial deployment.
31+
Configurable reasoning effort: Easily adjust the reasoning effort (low, medium, high) based on your specific use case and latency needs.
32+
Full chain-of-thought: Gain complete access to the model’s reasoning process, facilitating easier debugging and increased trust in outputs. It’s not intended to be shown to end users.
33+
Fine-tunable: Fully customize models to your specific use case through parameter fine-tuning.
34+
Agentic capabilities: Use the models’ native capabilities for function calling, web browsing, Python code execution, and Structured Outputs.
35+
Native MXFP4 quantization: The models are trained with native MXFP4 precision for the MoE layer, making gpt-oss-120b run on a single H100 GPU and the gpt-oss-20b model run within 16GB of memory.
36+
overrides:
37+
parameters:
38+
model: gpt-oss-20b-mxfp4.gguf
39+
files:
40+
- filename: gpt-oss-20b-mxfp4.gguf
41+
sha256: 52f57ab7d3df3ba9173827c1c6832e73375553a846f3e32b49f1ae2daad688d4
42+
uri: huggingface://ggml-org/gpt-oss-20b-GGUF/gpt-oss-20b-mxfp4.gguf
243
- &afm
344
name: "arcee-ai_afm-4.5b"
445
url: "github:mudler/LocalAI/gallery/chatml.yaml@master"

0 commit comments

Comments
 (0)