Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
161 commits
Select commit Hold shift + click to select a range
2a57581
Merge pull request #29 from NotPunchnox/Beta
NotPunchnox Apr 12, 2025
ceab0bf
Support tag names as model aliases in Ollama API
alexeyvolkoff Apr 16, 2025
77d2a45
Merge pull request #33 from alexeyvolkoff/main
NotPunchnox Apr 16, 2025
53155dc
Docker: container improvements
goetzc Apr 20, 2025
ff574e5
Merge pull request #36 from goetzc/docker-improvements
NotPunchnox Apr 21, 2025
c9440f6
Update docker-publish.yml; v5 -> v6
NotPunchnox Apr 23, 2025
1420b03
Update docker/metadata-action@v6 -> @v5
NotPunchnox Apr 23, 2025
471e966
update setup-buildx-action
NotPunchnox Apr 23, 2025
8ca86a5
update docker-publish.yml
NotPunchnox Apr 23, 2025
1722778
env.IMAGE_NAME -> notpunchnox/rkllama ( lower )
NotPunchnox Apr 23, 2025
bd4bc76
fix not assigned (if [[ -n "{1-}" && "" == "--no-conda" ]]; then)
NotPunchnox Apr 23, 2025
57badd3
Update Dockerfile
NotPunchnox Apr 28, 2025
4eea2c8
feat(docker): resolve merge conflict in Dockerfile with customized RK…
yvanitou-amical May 3, 2025
8df40a1
Merge pull request #40 from maltyxx/main
NotPunchnox May 5, 2025
6cfb74b
fix: correct indentation in pull_model function
feilongfl May 11, 2025
2b3bdbd
Merge pull request #43 from feilongfl/fix-pull
NotPunchnox May 11, 2025
c24a776
fix: use sudo for sed command to modify rkllama executable
feilongfl May 11, 2025
6eb1d7a
Merge pull request #44 from feilongfl/fix-setup-sudo
NotPunchnox May 12, 2025
ff20139
Tool Calling support. Fix context length for RKLLM 1.1.4.
danielferr85 May 15, 2025
3795257
Merge pull request #49 from danielferr85/main
NotPunchnox May 16, 2025
ce01511
fix: handle runtime errors during RKLLM model loading and initialization
feilongfl May 17, 2025
87a50c0
update librkllmrt.so to v1.2.1b1
feilongfl May 17, 2025
21c7387
update context length retrieval to use environment variable and refac…
feilongfl May 17, 2025
2fbe6c7
Merge pull request #45 from feilongfl/update-rkllm
NotPunchnox May 17, 2025
f9c0062
Now support Tool Call with Streaming. Option to disable thinking in m…
danielferr85 May 24, 2025
425ae70
Now support Tool Call with Streaming. Option to disable thinking in m…
danielferr85 May 24, 2025
4b82ec0
FIx thinking disable for api generate
danielferr85 May 24, 2025
5c10dc0
Merge pull request #52 from danielferr85/main
NotPunchnox May 24, 2025
77b185e
New model name approach
danielferr85 May 30, 2025
6645e9c
Update model mappings after pull
atiltman Jun 13, 2025
b1a753b
initialize_model_mappings-after-pulling-new-model
atiltman Jun 13, 2025
952a3cc
Merge pull request #56 from atiltman/main
NotPunchnox Jun 14, 2025
2035095
Improve Thinking with parameter in Modelfile and tools detection
danielferr85 Jun 17, 2025
89e6e5d
Thinking disabled by default
danielferr85 Jun 17, 2025
69235b7
Add comprehensive tool/function calling support and documentation
Jun 21, 2025
d503b5a
Merge pull request #57 from akaoio/main
NotPunchnox Jun 22, 2025
845c7e3
FIrst OpenAI Compatible Endpoint (/v1/chat/completions). Remove Simpl…
danielferr85 Jul 25, 2025
be7cc02
Merge remote-tracking branch 'origin/main' into models_names
danielferr85 Jul 25, 2025
30a0541
FIx after merge
danielferr85 Jul 25, 2025
99cfabf
Merge pull request #59 from danielferr85/main
NotPunchnox Aug 1, 2025
be3de71
Only override y not None value. Remove comment code
danielferr85 Aug 13, 2025
68f4f25
Tool calling support now for api/generate. Some other minor improveme…
danielferr85 Aug 27, 2025
de39309
New OpenAI COmpatible endpoint v1/completions. Remove tools from api/…
danielferr85 Aug 27, 2025
1c9d30c
FIx streaming openai v1/completion
danielferr85 Aug 27, 2025
8dc0179
No wait for tool call in streaming when no tools provided in the request
danielferr85 Aug 27, 2025
da2f691
Multi load RKLLM models in memory and Embedding support
danielferr85 Aug 31, 2025
4c6c120
Merge pull request #63 from danielferr85/main
NotPunchnox Sep 2, 2025
d923a79
Multimodal Supporrt. Add parameter "think" to thinking for new versi…
danielferr85 Sep 4, 2025
315b3a1
FIles not staged at previous commit
danielferr85 Sep 4, 2025
f636755
Fix clear_cache number of arguments of a task for a worker
danielferr85 Sep 4, 2025
02a8ce1
OpenAI API compatible with images(mutimodal). Some minur improvements…
danielferr85 Sep 4, 2025
5681818
Fix error typo in function clear cache. Use only the last image in a …
danielferr85 Sep 5, 2025
485ef60
Merge pull request #65 from danielferr85/main
NotPunchnox Sep 5, 2025
9cbb0c9
FIx in streaming and tool calls for a particular use case.
danielferr85 Sep 6, 2025
5b0a957
Merge pull request #66 from danielferr85/main
NotPunchnox Sep 9, 2025
e69d05d
init manifest
phkrl Sep 14, 2025
57683ec
move src to src/api
phkrl Sep 14, 2025
6b4106e
move root python files into modules
phkrl Sep 14, 2025
55cb89a
package scripts
phkrl Sep 14, 2025
f3bb0d4
manage dependencies
phkrl Sep 14, 2025
cbd1430
import config
phkrl Sep 14, 2025
7e26516
move config_schema to submodule
phkrl Sep 14, 2025
07e9978
use new modules format for import
phkrl Sep 14, 2025
73c570e
fix imports in rkllama api
phkrl Sep 20, 2025
504b53c
do not call functions that require root unless running as root
phkrl Sep 20, 2025
cb0f210
Merge pull request #68 from phkrl/packaging
NotPunchnox Sep 26, 2025
da0c6f3
Fix python package setuptools (pyproject.toml) and location of lib fo…
danielferr85 Sep 28, 2025
168229d
Change version number
danielferr85 Sep 28, 2025
5bd351b
Merge pull request #71 from danielferr85/main
NotPunchnox Sep 28, 2025
9488f00
New library vrsion rkllm 1.2.2
danielferr85 Sep 30, 2025
93739f0
Update version of the library in the documentation and the pyproject.…
danielferr85 Oct 1, 2025
890f08d
Merge pull request #72 from danielferr85/main
NotPunchnox Oct 2, 2025
b29a185
OpenAI Image generation endpoint from Stable Diffusion RKNN
danielferr85 Oct 2, 2025
e3efb75
Increase version and documentation for Image Generation
danielferr85 Oct 2, 2025
c3a380c
Merge pull request #73 from danielferr85/main
NotPunchnox Oct 4, 2025
04070f9
Fix Docker Compose configuration
goetzc Oct 5, 2025
b3ec880
Merge pull request #74 from goetzc/main
NotPunchnox Oct 6, 2025
83daa36
Multiple Images allowed for multimodal requests
danielferr85 Oct 25, 2025
0141678
Updated Version and documentation
danielferr85 Oct 25, 2025
ca88608
Fix error in Dockerfile that try to copy the models folder to constru…
danielferr85 Oct 25, 2025
4bf7402
FIx reported error #79
danielferr85 Oct 25, 2025
3ff8de9
FIx issue #80
danielferr85 Oct 25, 2025
87281d1
Merge pull request #84 from danielferr85/main
NotPunchnox Oct 25, 2025
fbcab24
Improvement with calculating required memory for model load.
danielferr85 Nov 10, 2025
296e367
Merge pull request #89 from danielferr85/main
NotPunchnox Nov 10, 2025
c1feca6
New rkllm library 1.2.3
danielferr85 Nov 24, 2025
47aff1d
Merge pull request #91 from danielferr85/main
NotPunchnox Nov 24, 2025
ead6659
Support for image generation for model ssd1b (distilled SDXL)
danielferr85 Nov 25, 2025
3b1861c
Merge branch 'NotPunchnox:main' into main
danielferr85 Nov 25, 2025
dc81ab1
Merge pull request #92 from danielferr85/main
NotPunchnox Nov 26, 2025
52919ce
Update model path retrieval in prepare_prompt function
CliffHan Nov 28, 2025
a771c1c
Include OpenAI API models endpoint for Nextcloud integration (Issue #78)
danielferr85 Dec 1, 2025
9fd543d
Merge pull request #95 from danielferr85/main
NotPunchnox Dec 3, 2025
6036b9e
Merge pull request #93 from CliffHan/patch-1
NotPunchnox Dec 7, 2025
08e225e
(Beta) OpenAI Endpoint for /v1/audio/speech for Piper voices. Change …
danielferr85 Dec 15, 2025
5a13339
Merge pull request #98 from danielferr85/main
NotPunchnox Dec 18, 2025
4c6ddce
(BETA) STT with OmniASR CTC models for OpenAI Transcriptions endpoint
danielferr85 Dec 23, 2025
a151fb8
Fix dependency issue and change default max context to prevent proble…
danielferr85 Dec 23, 2025
004dc88
Merge pull request #100 from danielferr85/main
NotPunchnox Dec 24, 2025
bb86630
Support for MMS-TTS models for TTS and all Whisper models for STT. Fi…
danielferr85 Jan 14, 2026
836ee86
Merge pull request #106 from danielferr85/main
NotPunchnox Jan 15, 2026
6057ee2
updated files
danielferr85 Jan 19, 2026
42dd283
Updated version
danielferr85 Jan 19, 2026
86341dd
fix: optimize inference performance by fixing token processing loop
jacopomaroli Jan 20, 2026
cafe948
Merge pull request #107 from danielferr85/main
NotPunchnox Jan 20, 2026
b6c1307
Support for local tokenizer. Tokenizer only download for the first ti…
danielferr85 Jan 22, 2026
7c65bd1
Merge pull request #110 from danielferr85/main
NotPunchnox Jan 22, 2026
04d972a
Merge pull request #109 from jacopomaroli/fix/inference-performance-o…
NotPunchnox Jan 22, 2026
38329dc
FIx issues #70 and #111 (Force transformers version, Include whisper …
danielferr85 Jan 30, 2026
16a2ad9
Merge pull request #114 from danielferr85/main
NotPunchnox Feb 2, 2026
dbca332
FIx issue #117 for sequential embedding requests
danielferr85 Feb 5, 2026
cf377ef
Fix correct embedding for input.
danielferr85 Feb 6, 2026
d356aa5
FIx embedding when input text is array
danielferr85 Feb 6, 2026
9661e39
Merge pull request #118 from danielferr85/main
NotPunchnox Feb 6, 2026
fc1fa31
add `build` folder and `src/rkllama.egg-info/*` in .gitignore
NotPunchnox Feb 19, 2026
3e5f101
Add usage metrics for token processing in chat completion responses
NotPunchnox Feb 19, 2026
3dc881e
Enhance verbose output for token usage and response timing in client
NotPunchnox Feb 19, 2026
f1a180b
Bump version to 0.0.60 and enhance model information display in client
NotPunchnox Feb 19, 2026
31cf0f0
Refactor code structure for improved readability and maintainability
NotPunchnox Feb 19, 2026
30e9319
Force torch version. Issue ##122
danielferr85 Feb 20, 2026
aa1c23d
Merge pull request #124 from danielferr85/main
NotPunchnox Feb 21, 2026
6ac0e18
Performance Improvements
danielferr85 Feb 27, 2026
7eb44a3
Merge pull request #126 from danielferr85/main
NotPunchnox Mar 3, 2026
f80b669
Stage 2 of Performance changes: prompt cache file between chat sessio…
danielferr85 Mar 8, 2026
49e1295
Merge pull request #128 from danielferr85/main
NotPunchnox Mar 9, 2026
1d4d3dc
Improvements aborting inference when timeout to prevent exceptions. M…
danielferr85 Mar 15, 2026
59bf2b4
Merge pull request #132 from danielferr85/main
NotPunchnox Mar 15, 2026
0f22e52
Improvements for Multimodal and other minor fixes
danielferr85 Mar 19, 2026
643233e
fix: replace double quotes with single quotes inside f-strings in wor…
aalaei Mar 19, 2026
20fe932
Merge pull request #134 from danielferr85/main
NotPunchnox Mar 20, 2026
1245c4c
Merge pull request #135 from aalaei/fix-fstring
NotPunchnox Mar 20, 2026
5316d66
Vision encoder running in the same rkllm worker process for better pe…
danielferr85 Mar 25, 2026
04c4f26
Increase number version
danielferr85 Mar 25, 2026
9201956
Merge pull request #136 from danielferr85/main
NotPunchnox Mar 26, 2026
9e503b0
Fix RKNN image generator float32 input normalization
Nixo0725 Apr 5, 2026
2ae1e89
Delete tests/test_rknn2model_inputs.py
NotPunchnox Apr 6, 2026
1321bd2
Delete tests/__init__.py
NotPunchnox Apr 6, 2026
cbac0a5
Change runner to ubuntu-24.04-arm for Docker publish
lancehudson Apr 7, 2026
6be77ea
Update Docker cache references in workflow
lancehudson Apr 7, 2026
a301c33
Update Docker workflow to use latest action versions
lancehudson Apr 7, 2026
4406cdd
Merge pull request #141 from lancehudson/update-buildscript
NotPunchnox Apr 11, 2026
cb4db95
Update .gitignore
NotPunchnox Apr 11, 2026
45d76b3
Merge pull request #140 from Nixo0725/codex/fix-rknn-float32-inputs
NotPunchnox Apr 11, 2026
ba886dc
Normalize Docker image name in workflow
lancehudson Apr 11, 2026
cc316e1
Merge pull request #143 from lancehudson/update-buildscript
NotPunchnox Apr 12, 2026
b522ff1
fix: worker TTL unload — add timeout + force-kill to prevent zombie p…
jaylfc Apr 13, 2026
e10f03d
feat: track which client loaded each model via loaded_by field
jaylfc Apr 13, 2026
89812f0
fix: add threading lock to prevent concurrent duplicate worker spawns
jaylfc Apr 13, 2026
e7d60aa
fix: prevent orphaned worker processes on ungraceful shutdown
jaylfc Apr 13, 2026
946ed13
fix: reap dead workers — remove stale entries when process dies unexp…
jaylfc Apr 13, 2026
d8da3b2
Merge pull request #144 from jaylfc/fix/worker-lifecycle
NotPunchnox Apr 14, 2026
3b99350
fix: disable PR_SET_PDEATHSIG (kernel binds it to parent thread, not …
iiiokojiadbi Apr 15, 2026
1836cf4
Merge pull request #145 from iiiokojiadbi/fix/pr-set-pdeathsig-flask-…
NotPunchnox Apr 16, 2026
d0e75a3
Fix #116 for multispeaker for Piper voice
danielferr85 Apr 21, 2026
f87dc3b
Merge pull request #146 from danielferr85/main
NotPunchnox Apr 22, 2026
385b615
fix: switch to ubuntu:24.04 base to fix ARMv8.2-A PAC incompatibility
schwankner Apr 28, 2026
491b748
fix: remove explicit platforms: linux/arm64 from Buildx to prevent ca…
schwankner Apr 28, 2026
a2d5000
fix: revert unnecessary action version downgrades, fix misleading bui…
schwankner May 1, 2026
900d03a
fix: restore all original comments, revert build-push-action@v6 → @v7
schwankner May 1, 2026
f00bd9c
Merge pull request #149 from schwankner/fix/arm64-ubuntu-base
NotPunchnox May 3, 2026
76370d6
feat: add tokenizer fallback and null-safe processor check
CodeAKrome May 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
models/
44 changes: 27 additions & 17 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ env:

jobs:
build:
runs-on: [self-hosted, Linux, ARM64]
runs-on: [ubuntu-24.04-arm]
permissions:
contents: read
packages: write
Expand All @@ -32,29 +32,36 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Normalize image name to lowercase
run: echo "IMAGE_NAME_LC=${IMAGE_NAME,,}" >> $GITHUB_ENV
env:
IMAGE_NAME: ${{ env.IMAGE_NAME }}

# Install the cosign tool except on PR
# https://github.com/sigstore/cosign-installer
- name: Install cosign
if: github.event_name != 'pull_request'
uses: sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20 #v3.5.0
with:
cosign-release: 'v2.2.4'
uses: sigstore/cosign-installer@v4.1.1

# Set up BuildKit Docker container builder to be able to build
# multi-platform images and export cache
# https://github.com/docker/setup-buildx-action
#
# NOTE: Do NOT set `platforms: linux/arm64` here — on a native
# ubuntu-24.04-arm runner this forces QEMU-backed cross-compilation
# even though the runner is natively arm64, causing the docker-container
# builder to pull and cache amd64 base layers and contaminate subsequent
# arm64 builds. Omitting the flag builds for the runner's native arch.
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
platforms: linux/arm64
uses: docker/setup-buildx-action@v4

# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
uses: docker/login-action@v4
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
Expand All @@ -64,23 +71,26 @@ jobs:
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
uses: docker/metadata-action@v6
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_LC }}

# Build and push Docker image with Buildx (don't push on PR)
# Build and push Docker image with Buildx
# https://github.com/docker/build-push-action
#
# NOTE: Do NOT set `platforms: linux/arm64` here — same reason as above.
# The cache key uses the -arm64 suffix to avoid reusing the stale amd64
# cache that existed before the runner switch to ubuntu-24.04-arm.
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
uses: docker/build-push-action@v7
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/arm64
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME_LC }}:buildcache-arm64
cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME_LC }}:buildcache-arm64,mode=max

# Sign the resulting Docker image digest except on PRs.
# This will only write to the public Rekor transparency log when the Docker
Expand All @@ -95,4 +105,4 @@ jobs:
DIGEST: ${{ steps.build-and-push.outputs.digest }}
# This step uses the identity token to provision an ephemeral certificate
# against the sigstore community Fulcio instance.
run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}
run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}
27 changes: 25 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
models/*/*.rkllm
models/*/*
models/**/*
src/__pycache__
*.log
config/config.env
build
tests
src/rkllama.egg-info/*

# macOS system files
.DS_Store

# Python bytecode
__pycache__/
**/__pycache__/
*.py[cod]
*$py.class

# Virtual environments
venv/
env/
ENV/

# IDE files
.vscode/
.idea/

# Converter directory
# Uncomment if you want to ignore it
# converter/
46 changes: 38 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,48 @@
FROM python:slim
FROM ubuntu:24.04

# RK3588 (Cortex-A76/A55) is ARMv8.2-A — it does NOT support Pointer
# Authentication (PAC, ARMv8.3-A). Debian Trixie ARM64 packages
# (python:3.12-slim) are compiled with PAC guards; the kernel returns
# ENOEXEC for those binaries on RK3588, causing "exec format error" at
# container startup. Ubuntu 24.04 ARM64 packages do NOT use PAC and
# run correctly on ARMv8.2-A hardware.
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update \
&& apt-get install -y --no-install-recommends libgomp1 wget curl sudo \
&& apt-get install -y --no-install-recommends \
python3.12 python3.12-dev python3-pip python3.12-venv \
libgomp1 wget curl sudo git build-essential \
ffmpeg libsm6 libxext6 \
&& rm -rf /var/cache/apt/archives /var/lib/apt/lists/*

# Use a virtual environment to avoid Ubuntu 24.04's PEP 668
# "externally-managed-environment" restriction.
RUN python3 -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"

RUN pip install --no-cache-dir --upgrade pip \
&& pip install --no-cache-dir "setuptools<82.0.0"

WORKDIR /opt/rkllama

COPY ./lib /opt/rkllama/lib
# Copy RKLLM runtime library explicitly
COPY ./src/rkllama/lib/librkllmrt.so /usr/lib/
RUN chmod 755 /usr/lib/librkllmrt.so && ldconfig

# Copy RKNN runtime library explicitly
COPY ./src/rkllama/lib/librknnrt.so /usr/lib/
RUN chmod 755 /usr/lib/librknnrt.so && ldconfig

# Copy the source and other resources of the RKllama project
COPY ./src /opt/rkllama/src
COPY requirements.txt README.md LICENSE *.sh *.py /opt/rkllama/
RUN chmod +x setup.sh && ./setup.sh --no-conda
RUN mkdir /opt/rkllama/models
COPY README.md LICENSE pyproject.toml /opt/rkllama/

# Install RKllama project
RUN pip install --no-cache-dir .

EXPOSE 8080

#CMD ["/usr/local/bin/rkllama", "serve", "port"] if you want to change the port.
#example: CMD ["/usr/local/bin/rkllama", "serve", "3000"]
CMD ["/usr/local/bin/rkllama", "serve"]
# If you want to change the port see the
# documentation/configuration.md for the INI file settings.
CMD ["rkllama_server", "--models", "/opt/rkllama/models"]
Loading