"ollama Project Faces Critical Risks in Code Quality and Test Coverage Amidst Active Development."
Jeffrey Morgan (jmorganca)
.github/workflows/release.yaml
(+1, -0)Daniel Hiltgen (dhiltgen)
README.md
(+1, -19), docs/development.md
(+2, -0)Michael Yang (mxyng)
llm/ext_server/server.cpp
(+2, -2), llm/llama.cpp
(+1, -1), llm/patches/03-load_exception.diff
(+18, -5), llm/patches/05-default-pretokenizer.diff
(added, +35)Bruce MacDonald (BruceMacD)
llm/filetype.go
(+45, -5), llm/ggml.go
(+27, -5)Ikko Eltociear Ashimine (eltociear)
convert/tokenizer.go
(+2, -2)Josh (joshyan1)
cmd/cmd.go
.Patrick Devine (pdevine)
llm/server.go
and server/routes.go
.The team exhibits strong collaboration with frequent cross-reviews and integration of work across different aspects of the project. Key contributors like Daniel Hiltgen and Jeffrey Morgan are actively involved in various aspects of the project. The use of multiple branches for specific features or fixes indicates a well-organized approach to managing new developments without disrupting the main codebase.
Enhancements:
Bug Fixes:
These activities collectively indicate a focus on improving security, usability, and fixing critical bugs.
Severity: High
Severity: High
llm/ext_server/server.cpp
is extremely large (3338 lines), making it difficult to maintain and prone to errors. Recent changes include wiring up load progress and adding support for flash attention without adequate modularization.Severity: Medium
llm/server.go
within a short timeframe. This suggests instability or poor initial design, potentially leading to increased bugs.Severity: Medium
Severity: Medium
.github/workflows/release.yaml
to set a longer codesign timeout indicate previous deployment failures due to timeouts (#4605). Frequent deployment failures can delay critical updates.The ollama project is actively evolving with numerous enhancements and bug fixes. However, significant risks such as lack of test coverage for new functionalities and severe code quality issues need immediate attention. The team's collaborative efforts are commendable but addressing these risks is crucial for maintaining project stability and reliability.
Developer | Avatar | Branches | PRs | Commits | Files | Changes |
---|---|---|---|---|---|---|
Jeffrey Morgan | ![]() |
2 | 2/3/0 | 39 | 120 | 66352 |
vs. last report | = | -4/-2/-2 | +30 | +102 | +65606 | |
Michael Yang | ![]() |
4 | 5/4/1 | 20 | 67 | 1257 |
vs. last report | -3 | -11/-6/+1 | -4 | +34 | -528 | |
Josh | ![]() |
2 | 2/2/0 | 32 | 5 | 594 |
vs. last report | = | =/=/= | +24 | +3 | +351 | |
Patrick Devine | ![]() |
2 | 4/4/0 | 8 | 18 | 557 |
vs. last report | = | -5/-4/-1 | -1 | +4 | -59 | |
Daniel Hiltgen | ![]() |
1 | 7/4/1 | 4 | 7 | 100 |
vs. last report | = | -9/-10/+1 | -9 | -7 | -175 | |
Bruce MacDonald | ![]() |
1 | 0/1/0 | 1 | 2 | 82 |
vs. last report | -2 | -1/=/= | -3 | -4 | -54 | |
Sam | ![]() |
1 | 0/1/0 | 1 | 2 | 31 |
Michael | ![]() |
1 | 1/1/0 | 1 | 1 | 8 |
alwqx | ![]() |
1 | 1/1/0 | 1 | 2 | 4 |
vs. last report | +1 | +1/+1/-1 | +1 | +2 | +4 | |
Ikko Eltociear Ashimine | ![]() |
1 | 1/1/0 | 1 | 1 | 4 |
Sang Park | ![]() |
1 | 1/1/0 | 1 | 1 | 2 |
Rose Heart | ![]() |
1 | 0/1/0 | 1 | 1 | 1 |
vs. last report | = | -1/=/= | = | = | = | |
Zeyo (ZeyoYT) | 0 | 1/0/0 | 0 | 0 | 0 | |
vs. last report | = | =/=/= | = | = | = | |
Tyrell (Tyrell04) | 0 | 0/0/1 | 0 | 0 | 0 | |
vs. last report | = | -2/=/+1 | = | = | = | |
Alfred Nutile (alnutile) | 0 | 1/0/0 | 0 | 0 | 0 | |
Sam (protosam) | 0 | 1/0/0 | 0 | 0 | 0 | |
David Carreto Fidalgo (dcfidalgo) | 0 | 0/0/1 | 0 | 0 | 0 | |
Tony Dinh (trungdq88) | 0 | 1/0/0 | 0 | 0 | 0 | |
Michael Vorburger (vorburger) | 0 | 1/0/0 | 0 | 0 | 0 | |
Eric Curtin (ericcurtin) | 0 | 1/0/0 | 0 | 0 | 0 | |
vs. last report | = | =/=/= | = | = | = | |
rongfu.leng (lengrongfu) | 0 | 0/0/1 | 0 | 0 | 0 | |
vs. last report | = | -1/=/+1 | = | = | = | |
Lei Jitang (coolljt0725) | 0 | 1/0/1 | 0 | 0 | 0 | |
None (joecryptotoo) | 0 | 1/0/0 | 0 | 0 | 0 | |
richardanaya2_2048b.Q6_K.gguf (richardanaya) | 0 | 1/0/0 | 0 | 0 | 0 | |
clark (uppercaveman) | 0 | 1/0/1 | 0 | 0 | 0 | |
Nahian Pathan (pixelsoccupied) | 0 | 1/0/0 | 0 | 0 | 0 |
PRs: created by that dev and opened/merged/closed-unmerged during the period
The "ollama" project is a software initiative focused on providing tools and functionalities for managing and utilizing large language models in local environments. The project is under active development, with contributions from a dedicated team of developers. The organization responsible for the project is not explicitly mentioned, but the active involvement of multiple contributors suggests a collaborative effort, possibly open-source. The project's current state shows robust activity with ongoing enhancements in model handling, API usability, and system compatibility, indicating a positive trajectory towards further growth and innovation.
Jeffrey Morgan (jmorganca)
.github/workflows/release.yaml
(+1, -0)Daniel Hiltgen (dhiltgen)
README.md
(+1, -19), docs/development.md
(+2, -0)Daniel Hiltgen (dhiltgen)
README.md
(+1, -19), docs/development.md
(+2, -0)Michael Yang (mxyng)
llm/ext_server/server.cpp
(+2, -2), llm/llama.cpp
(+1, -1), llm/patches/03-load_exception.diff
(+18, -5), llm/patches/05-default-pretokenizer.diff
(added, +35)Daniel Hiltgen (dhiltgen)
llm/ext_server/server.cpp
(+13, -1), llm/patches/01-load-progress.diff
(added, +31), llm/server.go
(+17, -7)Bruce MacDonald (BruceMacD)
llm/filetype.go
(+45, -5), llm/ggml.go
(+27, -5)Jeffrey Morgan (jmorganca)
llm/server.go
(+5, -5), server/envconfig/config.go
(+10, -0), server/envconfig/config_test.go
(+3, -0), server/sched_test.go
(+1, -1)Michael (mchiang0610)
README.md
(+5, -3)Ikko Eltociear Ashimine (eltociear)
convert/tokenizer.go
(+2, -2)Josh (joshyan1)
cmd/cmd.go
.Patrick Devine (pdevine)
llm/server.go
and server/routes.go
.The development team exhibits strong collaboration patterns with frequent cross-reviews and integration of work across different aspects of the project. The use of multiple branches for specific features or fixes indicates a well-organized approach to managing new developments without disrupting the main codebase. Key contributors like Daniel Hiltgen, Michael Yang, Jeffrey Morgan, Patrick Devine, and Josh Yan are actively involved in various aspects of the project, showcasing a dynamic and collaborative workflow.
The recent flurry of activity underscores a robust phase of development for the ollama project. With ongoing enhancements in model handling, API usability, and system compatibility, the project is poised for further growth. The active involvement from both core developers and community contributors is a positive sign for the project's sustainability and innovation. Given the current trajectory, it is expected that further enhancements will continue to roll out, potentially introducing new features or expanding the range of compatible models and systems. This ongoing development effort is likely to further cement ollama's position as a valuable tool for developers looking to leverage large language models in a local environment.
Since the last report, there has been a substantial amount of activity in the Ollama project. This includes the opening of numerous new issues, updates to existing issues, and some issues being closed. The newly opened issues highlight various problems, enhancement requests, and user queries.
New Issues:
load_summarize_chain.map_reduce
with combine_prompt
, causing a tokenizer loading issue.curl|sh
installation.envconfig
and consolidating environment variables for better readability and accessibility./THUDM/CogVLM2
model.pip install -r llm/llama.cpp/requirements.txt
.ollama run codellama:34b
..gguf
files on macOS APFS to save disk space and improve performance.numDownloadParts
as an option to avoid overloading network routers during model pulls.Enhancements:
Resource Management:
API Response Handling:
Model Import and Usage Issues:
The recent activity within the Ollama project indicates active engagement from both maintainers and the community. While new features and improvements are being proposed and implemented, there are areas such as resource management, API enhancements, and model handling that require ongoing attention to ensure reliability and usability. The quick closure of several issues also reflects well on the project's maintenance processes.
scripts/install.sh
(+147, -144)The primary change in this PR is the addition of a truncation guard in the scripts/install.sh
file to prevent partially downloaded files from executing when using a curl | sh
installation method. The script has been refactored to improve readability and maintainability. Key changes include:
Refactoring and Cleanup:
Truncation Guard Implementation:
Functionality Enhancements:
diff --git a/scripts/install.sh b/scripts/install.sh
index 20b0db605d..fd7b81762d 100644
--- a/scripts/install.sh
+++ b/scripts/install.sh
@@ -2,15 +2,11 @@
# This script installs Ollama on Linux.
# It detects the current operating system architecture and installs the appropriate version of Ollama.
-set -eu
-
status() { echo ">>> $*" >&2; }
error() { echo "ERROR $*"; exit 1; }
warning() { echo "WARNING: $*"; }
-TEMP_DIR=$(mktemp -d)
cleanup() { rm -rf $TEMP_DIR; }
-trap cleanup EXIT
available() { command -v $1 >/dev/null; }
require() {
@@ -24,61 +20,10 @@ require() {
echo $MISSING
}
-[ "$(uname -s)" = "Linux" ] || error 'This script is intended to run on Linux only.'
-
-ARCH=$(uname -m)
-case "$ARCH" in
- x86_64) ARCH="amd64" ;;
- aarch64|arm64) ARCH="arm64" ;;
- *) error "Unsupported architecture: $ARCH" ;;
-esac
-
-KERN=$(uname -r)
-case "$KERN" in
- *icrosoft*WSL2 | *icrosoft*wsl2) ;;
- *icrosoft) error "Microsoft WSL1 is not currently supported. Please upgrade to WSL2 with 'wsl --set-version <distro> 2'" ;;
- *) ;;
-esac
-
-VER_PARAM="${OLLAMA_VERSION:+?version=$OLLAMA_VERSION}"
-
-SUDO=
-if [ "$(id -u)" -ne 0 ]; then
- # Running as root, no need for sudo
- if ! available sudo; then
- error "This script requires superuser permissions. Please re-run as root."
- fi
-
- SUDO="sudo"
-fi
-
-NEEDS=$(require curl awk grep sed tee xargs)
-if [ -n "$NEEDS" ]; then
- status "ERROR: The following tools are required but missing:"
- for NEED in $NEEDS; do
- echo " - $NEED"
- done
- exit 1
-fi
-
-status "Downloading ollama..."
-curl --fail --show-error --location --progress-bar -o $TEMP_DIR/ollama "https://ollama.com/download/ollama-linux-${ARCH}${VER_PARAM}"
-
-for BINDIR in /usr/local/bin /usr/bin /bin; do
- echo $PATH | grep -q $BINDIR && break || continue
-done
-
-status "Installing ollama to $BINDIR..."
-$SUDO install -o0 -g0 -m755 -d $BINDIR
-$SUDO install -o0 -g0 -m755 $TEMP_DIR/ollama $BINDIR/ollama
-
-install_success() {
+install_success() {
status 'The Ollama API is now available at 127.0.0.1:11434.'
status 'Install complete. Run "ollama" from the command line.'
}
-trap install_success EXIT
-
-# Everything from this point onwards is optional.
configure_systemd() {
if ! id ollama >/dev/null 2>&1; then
@@ -127,24 +72,15 @@ EOF
esac
}
-if available systemctl; then
- configure_systemd
-fi
-
-if ! available lspci && ! available lshw; then
- warning "Unable to detect NVIDIA/AMD GPU. Install lspci or lshw to automatically detect and install GPU dependencies."
- exit 0
-fi
-
check_gpu() {
# Look for devices based on vendor ID for NVIDIA and AMD
case $1 in
- lspci)
+ lspci)
case $2 in
nvidia) available lspci && lspci -d '10de:' | grep -q 'NVIDIA' || return 1 ;;
amdgpu) available lspci && lspci -d '1002:' | grep -q 'AMD' || return 1 ;;
esac ;;
- lshw)
+ lshw)
case $2 in
nvidia) available lshw && $SUDO lshw -c display -numeric | grep -q 'vendor: .* \[10DE\]' || return 1 ;;
amdgpu) available lshw && $SUDO lshw -c display -numeric | grep -q 'vendor: .* \[1002\]' || return 1 ;;
@@ -153,38 +89,6 @@ check_gpu() {
esac
}
-if check_gpu nvidia-smi; then
- status "NVIDIA GPU installed."
- exit 0
-fi
-
-if ! check_gpu lspci nvidia && ! check_gpu lshw nvidia && ! check_gpu lspci amdgpu && ! check_gpu lshw amdgpu; then
- install_success
- warning "No NVIDIA/AMD GPU detected. Ollama will run in CPU-only mode."
- exit 0
-fi
-
-if check_gpu lspci amdgpu || check_gpu lshw amdgpu; then
- # Look for pre-existing ROCm v6 before downloading the dependencies
- for search in "${HIP_PATH:-''}" "${ROCM_PATH:-''}" "/opt/rocm" "/usr/lib64"; do
- if [ -n "${search}" ] && [ -e "${search}/libhipblas.so.2" -o -e "${search}/lib/libhipblas.so.2" ]; then
- status "Compatible AMD GPU ROCm library detected at ${search}"
- install_success
- exit 0
- fi
- done
-
- status "Downloading AMD GPU dependencies..."
- $SUDO rm -rf /usr/share/ollama/lib
- $SUDO chmod o+x /usr/share/ollama
- $SUDO install -o ollama -g ollama -m 755 -d /usr/share/ollama/lib/rocm
- curl --fail --show-error --location --progress-bar "https://ollama.com/download/ollama-linux-amd64-rocm.tgz${VER_PARAM}" \
- | $SUDO tar zx --owner ollama --group ollama -C /usr/share/ollama/lib/rocm .
- install_success
- status "AMD GPU dependencies installed."
- exit 0
-fi
# ref: https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#rhel-7-centos-7
+main() {
+ set -eu
... (rest of the diff omitted for brevity)
The changes made in this PR demonstrate good coding practices and improvements in several areas:
Security Improvement: The addition of a truncation guard significantly enhances the security of the installation process by ensuring that partially downloaded scripts do not execute.
Code Refactoring: The script has been refactored for better readability and maintainability. Functions have been introduced or improved to handle specific tasks more cleanly.
Error Handling: Improved error handling ensures that users are better informed about what went wrong during the installation process.
Modular Design: Breaking down tasks into smaller functions makes the script easier to understand and modify in the future.
Comments and Documentation: The use of comments helps explain what each part of the script does, which is beneficial for future developers who may work on this code.
Overall, this PR enhances both the functionality and security of the installation script while making it more maintainable and understandable.
Since the last report 6 days ago, there has been considerable activity in the Ollama project's pull requests. Several new pull requests have been opened, and a number of them have been closed or merged. Below is a detailed analysis of the recent activity, highlighting notable changes and their implications for the project.
#4609: Add truncation guard
scripts/install.sh
(+147, -143)curl|sh
installation, enhancing installation reliability.#4608: Move envconfig and consolidate env vars
cmd/cmd.go
, envconfig/config.go
, and others.envconfig
to be accessible by both client and server, adding descriptions to environment variables for better clarity and maintainability.#4594: Add isolated gpu test to troubleshooting
docs/troubleshooting.md
(+1, -0)#4583: Add new community integration (TypingMind)
README.md
(+1, -0)#4570: lint some of the things
.github/workflows/test.yaml
, cmd/cmd.go
, and others.#4605: Set darwin CI timeout to longer
.github/workflows/release.yaml
(+1, -0)#4598: Tidy up developer guide a little
README.md
(-19), docs/development.md
(+2)#4597: bump
llm/ext_server/server.cpp
, llm/patches/03-load_exception.diff
#4581: DO NOT MERGE - testing CI
#4580: Use flash attention flag for now
llm/server.go
, server/envconfig/config.go
The Ollama project has seen substantial activity over the past six days with numerous PRs being opened and closed. The changes range from minor documentation updates to significant code improvements that enhance usability, performance, and maintainability. The project's active development and community engagement are evident from these updates.
For future development, it will be important to continue focusing on stability improvements and addressing any remaining bugs promptly while also expanding community integrations and support for various platforms.
.github/workflows/release.yaml
Structure and Quality:
build-darwin
, generate-windows-cpu
, generate-windows-rocm
, generate-windows-cuda
, build-windows
, build-linux-amd64
, build-linux-arm64
, release
). This modular approach is good for parallel execution and clarity.$ErrorActionPreference = "Stop"
in PowerShell scripts).Quality:
Recent Changes:
docs/development.md
Structure and Quality:
Quality:
Recent Changes:
llm/ext_server/server.cpp
Structure and Quality:
Quality:
Recent Changes:
llm/patches/01-load-progress.diff
Structure and Quality:
common.cpp
and common.h
to add progress callback functionality.Quality:
Recent Changes:
llm/server.go
Structure and Quality:
Quality:
Recent Changes:
server/envconfig/config.go
Structure and Quality:
Quality:
clean()
for sanitizing input enhances readability.Recent Changes:
convert/safetensors.go
Structure and Quality:
Quality:
Recent Changes:
convert/tokenizer.go
Structure and Quality:
Quality:
Recent Changes:
docs/troubleshooting.md
Structure and Quality:
Quality:
Recent Changes:
Severity: High (3/3)
Rationale
The absence of test coverage for new functionalities can lead to undetected bugs, which may cause significant issues in production environments.
scripts/install.sh
), does not include any associated tests to verify the new functionality.Next Steps
Severity: High (3/3)
Rationale
Severe code quality issues can introduce critical bugs and security vulnerabilities, especially in core components like server files.
llm/ext_server/server.cpp
is extremely large (3338 lines), which can make it difficult to maintain and prone to errors. Additionally, recent changes include wiring up load progress and adding support for flash attention without adequate modularization.Next Steps
llm/ext_server/server.cpp
into smaller, more manageable modules.Severity: Medium (2/3)
Rationale
Frequent rewrites can indicate underlying problems with code stability or design, potentially leading to increased bug introduction and decreased development velocity.
llm/server.go
and server/envconfig/config.go
within a short timeframe (e.g., #4580, #4547).Next Steps
Severity: Medium (2/3)
Rationale
Prolonged disagreements can indicate deeper issues within the team, potentially affecting morale and productivity.
Next Steps
Severity: Medium (2/3)
Rationale
Deployment failures can disrupt the release process, delaying critical updates and fixes from reaching production environments.
.github/workflows/release.yaml
to set a longer codesign timeout indicates previous deployment failures due to timeouts (#4605).Next Steps