From c68907ac6588ecfaddc45699d1caebdcbcc676b1 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Tue, 5 Aug 2025 23:08:34 +0200 Subject: [PATCH 1/5] chore(models): add gpt-oss-20b (#5973) Signed-off-by: Ettore Di Giacinto --- gallery/harmony.yaml | 76 ++++++++++++++++++++++++++++++++++++++++++++ gallery/index.yaml | 41 ++++++++++++++++++++++++ 2 files changed, 117 insertions(+) create mode 100644 gallery/harmony.yaml diff --git a/gallery/harmony.yaml b/gallery/harmony.yaml new file mode 100644 index 000000000000..889c3c0a256f --- /dev/null +++ b/gallery/harmony.yaml @@ -0,0 +1,76 @@ +--- +name: "harmony" + +config_file: | + mmap: true + backend: "llama-cpp" + template: + chat_message: | + <|start|>{{ if .FunctionCall -}}functions.{{ .FunctionCall.Name }} to=assistant{{ else if eq .RoleName "assistant"}}<|channel|>final<|message|>{{else}}{{ .RoleName }}{{end}}<|message|> + {{ if .Content -}} + {{.Content }} + {{ end -}} + {{ if .FunctionCall -}} + {{toJson .FunctionCall}} + {{ end -}}<|end|> + function: | + <|im_start|>system + 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: + + <|start|>system<|message|>You are ChatGPT, a large language model trained by OpenAI. + Knowledge cutoff: 2024-06 + Current date: {{ now | date }} + + Reasoning: medium + + # Tools + + ## functions + + namespace functions { + {{-range .Functions}} + {{if .Description }} + // {{ .Description }} + {{- end }} + {{- if and .Parameters.Properties (gt (len .Parameters.Properties) 0) }} + type {{ .Name }} = (_: { + {{- range $name, $prop := .Parameters.Properties }} + {{- if $prop.Description }} + // {{ $prop.Description }} + {{- end }} + {{ $name }}: {{ if gt (len $prop.Type) 1 }}{{ range $i, $t := $prop.Type }}{{ if $i }} | {{ end }}{{ $t }}{{ end }}{{ else }}{{ index $prop.Type 0 }}{{ end }}, + {{- end }} + }) => any; + {{- else }} + type {{ .Function.Name }} = () => any; + {{- end }} + {{- end }}{{/* end of range .Functions */}} + } // namespace functions + + # Instructions + + <|end|> + {{.Input -}} + <|start|>assistant + chat: | + <|start|>system<|message|>You are ChatGPT, a large language model trained by OpenAI. + Knowledge cutoff: 2024-06 + Current date: {{ now | date }} + + Reasoning: medium + + # Instructions + + <|end|> + {{.Input -}} + <|im_start|>assistant + completion: | + {{.Input}} + context_size: 8192 + f16: true + stopwords: + - '<|im_end|>' + - '' + - '' + - '<|endoftext|>' + - '<|end|>s' diff --git a/gallery/index.yaml b/gallery/index.yaml index 3453371148d5..11329aefd1e5 100644 --- a/gallery/index.yaml +++ b/gallery/index.yaml @@ -1,4 +1,45 @@ --- +- &gptoss + name: "gpt-oss-20b" + url: "github:mudler/LocalAI/gallery/harmony.yaml@master" + license: apache-2.0 + tags: + - gguf + - gpu + - cpu + - gguf + - openai + icon: https://raw.githubusercontent.com/openai/gpt-oss/main/docs/gpt-oss-20b.svg + urls: + - https://huggingface.co/openai/gpt-oss-20b + - https://huggingface.co/ggml-org/gpt-oss-20b-GGUF + description: | + Welcome to the gpt-oss series, OpenAI’s open-weight models designed for powerful reasoning, agentic tasks, and versatile developer use cases. + + We’re releasing two flavors of the open models: + + 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) + gpt-oss-20b — for lower latency, and local or specialized use cases (21B parameters with 3.6B active parameters) + + 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. + + This model card is dedicated to the smaller gpt-oss-20b model. Check out gpt-oss-120b for the larger model. + + Highlights + + Permissive Apache 2.0 license: Build freely without copyleft restrictions or patent risk—ideal for experimentation, customization, and commercial deployment. + Configurable reasoning effort: Easily adjust the reasoning effort (low, medium, high) based on your specific use case and latency needs. + 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. + Fine-tunable: Fully customize models to your specific use case through parameter fine-tuning. + Agentic capabilities: Use the models’ native capabilities for function calling, web browsing, Python code execution, and Structured Outputs. + 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. + overrides: + parameters: + model: gpt-oss-20b-mxfp4.gguf + files: + - filename: gpt-oss-20b-mxfp4.gguf + sha256: 52f57ab7d3df3ba9173827c1c6832e73375553a846f3e32b49f1ae2daad688d4 + uri: huggingface://ggml-org/gpt-oss-20b-GGUF/gpt-oss-20b-mxfp4.gguf - &afm name: "arcee-ai_afm-4.5b" url: "github:mudler/LocalAI/gallery/chatml.yaml@master" From a5c0fe31c337ea3d91025a0528d2a0f703cdab11 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Tue, 5 Aug 2025 23:13:24 +0200 Subject: [PATCH 2/5] chore(models): add gpt-oss-120b (#5974) Signed-off-by: Ettore Di Giacinto --- gallery/index.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/gallery/index.yaml b/gallery/index.yaml index 11329aefd1e5..3cc71b9995d8 100644 --- a/gallery/index.yaml +++ b/gallery/index.yaml @@ -40,6 +40,26 @@ - filename: gpt-oss-20b-mxfp4.gguf sha256: 52f57ab7d3df3ba9173827c1c6832e73375553a846f3e32b49f1ae2daad688d4 uri: huggingface://ggml-org/gpt-oss-20b-GGUF/gpt-oss-20b-mxfp4.gguf +- !!merge <<: *gptoss + name: "gpt-oss-120b" + url: "github:mudler/LocalAI/gallery/harmony.yaml@master" + icon: https://raw.githubusercontent.com/openai/gpt-oss/main/docs/gpt-oss-120b.svg + urls: + - https://huggingface.co/openai/gpt-oss-120b + - https://huggingface.co/ggml-org/gpt-oss-120b-GGUF + overrides: + parameters: + model: gpt-oss-120b-mxfp4-00001-of-00003.gguf + files: + - filename: gpt-oss-120b-mxfp4-00001-of-00003.gguf + sha256: 40b630223b9fc43820fa0aae5d0ab61020f5858d1719642357753dca9e7df29f + uri: huggingface://ggml-org/gpt-oss-120b-GGUF/gpt-oss-120b-mxfp4-00001-of-00003.gguf + - filename: gpt-oss-120b-mxfp4-00002-of-00003.gguf + sha256: fbdb8cdec70edb82c53bfc69cc0f54a34759a23d317fa0771a63be6571907b38 + uri: huggingface://ggml-org/gpt-oss-120b-GGUF/gpt-oss-120b-mxfp4-00002-of-00003.gguf + - filename: gpt-oss-120b-mxfp4-00003-of-00003.gguf + sha256: b326bfd8ac696c4b9a14e9e84d5529b2bb86847aea0e65443cbf075accba8b71 + uri: huggingface://ggml-org/gpt-oss-120b-GGUF/gpt-oss-120b-mxfp4-00003-of-00003.gguf - &afm name: "arcee-ai_afm-4.5b" url: "github:mudler/LocalAI/gallery/chatml.yaml@master" From f207bd14276ba26ef4b1af3425065231b0cfde29 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Tue, 5 Aug 2025 23:14:11 +0200 Subject: [PATCH 3/5] Update backend.yml Signed-off-by: Ettore Di Giacinto --- .github/workflows/backend.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/backend.yml b/.github/workflows/backend.yml index 0142018c76f2..fb05611e0f28 100644 --- a/.github/workflows/backend.yml +++ b/.github/workflows/backend.yml @@ -2,7 +2,6 @@ name: 'build backend container images' on: - pull_request: push: branches: - master @@ -1099,4 +1098,4 @@ jobs: run: | for tag in $(echo "${{ steps.quaymeta.outputs.tags }}" | tr ',' '\n'); do crane push llama-cpp.tar $tag - done \ No newline at end of file + done From 03e8592450df6bf945c8172b23253cccb0863e38 Mon Sep 17 00:00:00 2001 From: "LocalAI [bot]" <139863280+localai-bot@users.noreply.github.com> Date: Tue, 5 Aug 2025 23:14:43 +0200 Subject: [PATCH 4/5] chore: :arrow_up: Update ggml-org/llama.cpp to `fd1234cb468935ea087d6929b2487926c3afff4b` (#5972) :arrow_up: Update ggml-org/llama.cpp Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: mudler <2420543+mudler@users.noreply.github.com> --- backend/cpp/llama-cpp/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/cpp/llama-cpp/Makefile b/backend/cpp/llama-cpp/Makefile index d449b250863d..3aac12db066c 100644 --- a/backend/cpp/llama-cpp/Makefile +++ b/backend/cpp/llama-cpp/Makefile @@ -1,5 +1,5 @@ -LLAMA_VERSION?=41613437ffee0dbccad684fc744788bc504ec213 +LLAMA_VERSION?=fd1234cb468935ea087d6929b2487926c3afff4b LLAMA_REPO?=https://github.com/ggerganov/llama.cpp CMAKE_ARGS?= From 7e2a522229f6466efad64381a808114c997c93c3 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Tue, 5 Aug 2025 23:58:48 +0200 Subject: [PATCH 5/5] Update harmony.yaml Signed-off-by: Ettore Di Giacinto --- gallery/harmony.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gallery/harmony.yaml b/gallery/harmony.yaml index 889c3c0a256f..a8b9b7eeeed7 100644 --- a/gallery/harmony.yaml +++ b/gallery/harmony.yaml @@ -73,4 +73,4 @@ config_file: | - '' - '' - '<|endoftext|>' - - '<|end|>s' + - '<|return|>'