Instructions to use sriram882004/SQL-Socratic-Models with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use sriram882004/SQL-Socratic-Models with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf sriram882004/SQL-Socratic-Models:Q8_0 # Run inference directly in the terminal: llama cli -hf sriram882004/SQL-Socratic-Models:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf sriram882004/SQL-Socratic-Models:Q8_0 # Run inference directly in the terminal: llama cli -hf sriram882004/SQL-Socratic-Models:Q8_0
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf sriram882004/SQL-Socratic-Models:Q8_0 # Run inference directly in the terminal: ./build/bin/llama cli -hf sriram882004/SQL-Socratic-Models:Q8_0
Use Docker
docker model run hf.co/sriram882004/SQL-Socratic-Models:Q8_0
- Llama new
- LM Studio
- Jan
- Ollama
How to use sriram882004/SQL-Socratic-Models with Ollama:
ollama run hf.co/sriram882004/SQL-Socratic-Models:Q8_0
- Unsloth Desktop
- Docker Model Runner
How to use sriram882004/SQL-Socratic-Models with Docker Model Runner:
docker model run hf.co/sriram882004/SQL-Socratic-Models:Q8_0
- Lemonade
How to use sriram882004/SQL-Socratic-Models with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull sriram882004/SQL-Socratic-Models:Q8_0
Run and chat with the model
lemonade run user.SQL-Socratic-Models-Q8_0
List all available models
lemonade list
- Atomic Chat
Upload FFT folder qwen25_7b__fft__base__unmasked
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
Files changed (50)
- .gitattributes+35
- qwen25/qwen25_7b__fft__base__unmasked/TRAINING_TAGS.jsonAdded+17
- qwen25/qwen25_7b__fft__base__unmasked/awq/quantize_awq.pyAdded+12
- qwen25/qwen25_7b__fft__base__unmasked/gguf/convert_to_gguf.shAdded+9
- qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.clang-formatAdded+171
- qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.clang-tidyAdded+28
- qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.devops/cann.DockerfileAdded+130
- qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.devops/cpu.DockerfileAdded+88
- qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.devops/cuda-new.DockerfileAdded+95
- qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.devops/cuda.DockerfileAdded+94
- qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.devops/intel.DockerfileAdded+95
- qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.devops/llama-cli-cann.DockerfileAdded+45
- qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.devops/llama-cpp-cuda.srpm.specAdded+85
- qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.devops/llama-cpp.srpm.specAdded+87
- qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.devops/musa.DockerfileAdded+101
- qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.devops/nix/apps.nixAdded+21
- qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.devops/nix/devshells.nixAdded+52
- qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.devops/nix/docker.nixAdded+37
- qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.devops/nix/jetson-support.nixAdded+39
- qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.devops/nix/nixpkgs-instances.nixAdded+45
- qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.devops/nix/package-gguf-py.nixAdded+38
- qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.devops/nix/package.nixAdded+243
- qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.devops/nix/python-scripts.nixAdded+66
- qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.devops/nix/scope.nixAdded+35
- qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.devops/nix/sif.nixAdded+27
- qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.devops/rocm.DockerfileAdded+113
- qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.devops/s390x.DockerfileAdded+126
- qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.devops/tools.shAdded+53
- qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.devops/vulkan.DockerfileAdded+90
- qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.dockerignoreAdded+20
- qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.ecrcAdded+6
- qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.editorconfigAdded+70
- qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.flake8Added+18
- qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.gemini/settings.jsonAdded+1
- qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.github/ISSUE_TEMPLATE/010-bug-compilation.ymlAdded+88
- qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.github/ISSUE_TEMPLATE/011-bug-results.ymlAdded+115
- qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.github/ISSUE_TEMPLATE/019-bug-misc.ymlAdded+103
- qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.github/ISSUE_TEMPLATE/020-enhancement.ymlAdded+51
- qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.github/ISSUE_TEMPLATE/030-research.ymlAdded+52
- qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.github/ISSUE_TEMPLATE/040-refactor.ymlAdded+28
- qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.github/ISSUE_TEMPLATE/config.ymlAdded+11
- qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.github/actions/get-tag-name/action.ymlAdded+22
- qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.github/actions/install-exe/action.ymlAdded+36
- qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.github/actions/linux-setup-spacemit/action.ymlAdded+20
- qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.github/actions/linux-setup-vulkan/action.ymlAdded+20
- qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.github/actions/unarchive-tar/action.ymlAdded+27
- qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.github/actions/windows-setup-cuda/action.ymlAdded+98
- qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.github/actions/windows-setup-rocm/action.ymlAdded+15
- qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.github/labeler.ymlAdded+106
- qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.github/pull_request_template.mdAdded+1
50 unmodified lines515253545556575859606162636465666768697071727374757677787980818283848586878850 unmodified linesgemma2/gemma2_9b__fft__base__unmasked/merged/checkpoint-400/tokenizer.json filter=lfs diff=lfs merge=lfs -textgemma2/gemma2_9b__fft__base__unmasked/merged/checkpoint-500/tokenizer.json filter=lfs diff=lfs merge=lfs -textgemma2/gemma2_9b__fft__base__unmasked/merged/tokenizer.json filter=lfs diff=lfs merge=lfs -textqwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/docs/android/imported-into-android-studio.jpg filter=lfs diff=lfs merge=lfs -textqwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/docs/development/llama-star/idea-arch.key filter=lfs diff=lfs merge=lfs -textqwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/gguf-py/gguf/__pycache__/constants.cpython-311.pyc filter=lfs diff=lfs merge=lfs -textqwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/gguf-py/gguf/__pycache__/gguf_writer.cpython-311.pyc filter=lfs diff=lfs merge=lfs -textqwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/gguf-py/gguf/__pycache__/quants.cpython-311.pyc filter=lfs diff=lfs merge=lfs -textqwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/media/llama0-banner.png filter=lfs diff=lfs merge=lfs -textqwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/media/llama0-logo.png filter=lfs diff=lfs merge=lfs -textqwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/media/matmul.png filter=lfs diff=lfs merge=lfs -textqwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/models/ggml-vocab-aquila.gguf filter=lfs diff=lfs merge=lfs -textqwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/models/ggml-vocab-baichuan.gguf filter=lfs diff=lfs merge=lfs -textqwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/models/ggml-vocab-bert-bge.gguf filter=lfs diff=lfs merge=lfs -textqwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/models/ggml-vocab-command-r.gguf filter=lfs diff=lfs merge=lfs -textqwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/models/ggml-vocab-deepseek-coder.gguf filter=lfs diff=lfs merge=lfs -textqwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/models/ggml-vocab-deepseek-llm.gguf filter=lfs diff=lfs merge=lfs -textqwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/models/ggml-vocab-falcon.gguf filter=lfs diff=lfs merge=lfs -textqwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/models/ggml-vocab-gpt-2.gguf filter=lfs diff=lfs merge=lfs -textqwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/models/ggml-vocab-gpt-neox.gguf filter=lfs diff=lfs merge=lfs -textqwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/models/ggml-vocab-llama-bpe.gguf filter=lfs diff=lfs merge=lfs -textqwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/models/ggml-vocab-llama-spm.gguf filter=lfs diff=lfs merge=lfs -textqwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/models/ggml-vocab-mpt.gguf filter=lfs diff=lfs merge=lfs -textqwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/models/ggml-vocab-nomic-bert-moe.gguf filter=lfs diff=lfs merge=lfs -textqwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/models/ggml-vocab-phi-3.gguf filter=lfs diff=lfs merge=lfs -textqwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/models/ggml-vocab-qwen2.gguf filter=lfs diff=lfs merge=lfs -textqwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/models/ggml-vocab-refact.gguf filter=lfs diff=lfs merge=lfs -textqwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/models/ggml-vocab-starcoder.gguf filter=lfs diff=lfs merge=lfs -textqwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/tools/mtmd/test-1.jpeg filter=lfs diff=lfs merge=lfs -textqwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/tools/mtmd/test-2.mp3 filter=lfs diff=lfs merge=lfs -textqwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/tools/server/themes/buttons-top/buttons_top.png filter=lfs diff=lfs merge=lfs -textqwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/tools/server/themes/wild/llamapattern.png filter=lfs diff=lfs merge=lfs -textqwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/tools/server/themes/wild/wild.png filter=lfs diff=lfs merge=lfs -textqwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/tools/server/webui/tests/stories/fixtures/assets/beautiful-flowers-lotus.webp filter=lfs diff=lfs merge=lfs -textqwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/tools/server/webui/tests/stories/fixtures/assets/example.pdf filter=lfs diff=lfs merge=lfs -textqwen25/qwen25_7b__fft__base__unmasked/merged/checkpoint-1500/tokenizer.json filter=lfs diff=lfs merge=lfs -textqwen25/qwen25_7b__fft__base__unmasked/merged/checkpoint-1626/tokenizer.json filter=lfs diff=lfs merge=lfs -textqwen25/qwen25_7b__fft__base__unmasked/merged/tokenizer.json filter=lfs diff=lfs merge=lfs -text1234567891011121314151617{ "variant_name": "qwen25_7b__fft__base__unmasked", "model_id": "Qwen/Qwen2.5-7B", "method": "fft", "is_instruct": false, "loss_mode": "unmasked", "max_length": 2048, "epochs": 3, "lr": 2e-05, "bs": 1, "grad_accum": 8, "outputs": { "merged": "./outputs_qwen25/qwen25_7b__fft__base__unmasked/merged", "gguf": "./outputs_qwen25/qwen25_7b__fft__base__unmasked/gguf", "awq": "./outputs_qwen25/qwen25_7b__fft__base__unmasked/awq" }}123456789101112#!/usr/bin/env python# Run after: pip install autoawqfrom awq import AutoAWQForCausalLMfrom transformers import AutoTokenizerimport torch
model = AutoAWQForCausalLM.from_pretrained("./outputs_qwen25/qwen25_7b__fft__base__unmasked/merged", torch_dtype=torch.float16, device_map="auto")tok = AutoTokenizer.from_pretrained("./outputs_qwen25/qwen25_7b__fft__base__unmasked/merged")model.quantize(tok, quant_config={"zero_point": True, "q_group_size": 128, "w_bit": 4, "version": "GEMM"})model.save_quantized("./outputs_qwen25/qwen25_7b__fft__base__unmasked/awq")tok.save_pretrained("./outputs_qwen25/qwen25_7b__fft__base__unmasked/awq")print("AWQ export complete → ./outputs_qwen25/qwen25_7b__fft__base__unmasked/awq")123456789#!/bin/bash# Run after: git clone https://github.com/ggerganov/llama.cpp
# LM Studio default — best size/quality balancepython llama.cpp/convert_hf_to_gguf.py ./outputs_qwen25/qwen25_7b__fft__base__unmasked/merged --outtype f16 --outfile ./outputs_qwen25/qwen25_7b__fft__base__unmasked/gguf/qwen25_7b__fft__base__unmasked_q4_k_m.gguf
# Higher quality — larger filepython llama.cpp/convert_hf_to_gguf.py ./outputs_qwen25/qwen25_7b__fft__base__unmasked/merged --outtype q8_0 --outfile ./outputs_qwen25/qwen25_7b__fft__base__unmasked/gguf/qwen25_7b__fft__base__unmasked_q8_0.gguf
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171---Language: CppAlignAfterOpenBracket: AlignAlignArrayOfStructures: LeftAlignConsecutiveAssignments: AcrossCommentsAlignConsecutiveBitFields: AcrossCommentsAlignConsecutiveDeclarations: AcrossCommentsAlignConsecutiveMacros: AcrossComments# AlignConsecutiveShortCaseStatements: AcrossCommentsAlignEscapedNewlines: Left # LeftWithLastLineAlignOperands: AlignAlignTrailingComments: Kind: Always OverEmptyLines: 1AllowAllArgumentsOnNextLine: trueAllowAllParametersOfDeclarationOnNextLine: false# AllowBreakBeforeNoexceptSpecifier: OnlyWithParenAllowShortBlocksOnASingleLine: NeverAllowShortCaseLabelsOnASingleLine: falseAllowShortFunctionsOnASingleLine: InlineAllowShortIfStatementsOnASingleLine: NeverAllowShortLambdasOnASingleLine: InlineAllowShortLoopsOnASingleLine: falseAlwaysBreakBeforeMultilineStrings: true# Treat CUDA keywords/attributes as "attribute macros" and avoid breaking lines inside themAttributeMacros: - __host__ - __device__ - __global__ - __forceinline__ - __launch_bounds__BinPackArguments: trueBinPackParameters: false # OnePerLineBitFieldColonSpacing: BothBreakBeforeBraces: Custom # AttachBraceWrapping: AfterCaseLabel: true AfterClass: false AfterControlStatement: false AfterEnum: false AfterFunction: false AfterNamespace: false AfterObjCDeclaration: false AfterStruct: false AfterUnion: false AfterExternBlock: false BeforeCatch: false BeforeElse: false BeforeLambdaBody: false BeforeWhile: false IndentBraces: false SplitEmptyFunction: false SplitEmptyRecord: false SplitEmptyNamespace: false# BreakAdjacentStringLiterals: trueBreakAfterAttributes: NeverBreakBeforeBinaryOperators: NoneBreakBeforeInlineASMColon: OnlyMultilineBreakBeforeTernaryOperators: false# BreakBinaryOperations: NeverBreakConstructorInitializers: AfterColon# BreakFunctionDefinitionParameters: falseBreakInheritanceList: AfterCommaBreakStringLiterals: true# BreakTemplateDeclarations: YesColumnLimit: 120CommentPragmas: '^ IWYU pragma:'CompactNamespaces: falseConstructorInitializerIndentWidth: 4ContinuationIndentWidth: 4Cpp11BracedListStyle: falseDerivePointerAlignment: falseDisableFormat: falseEmptyLineBeforeAccessModifier: LeaveEmptyLineAfterAccessModifier: NeverExperimentalAutoDetectBinPacking: falseFixNamespaceComments: trueIncludeBlocks: RegroupIncludeCategories: - Regex: '".*"' Priority: 1 SortPriority: 0 - Regex: '^<.*\.h>' Priority: 2 SortPriority: 0 - Regex: '^<.*' Priority: 3 SortPriority: 0 - Regex: '.*' Priority: 4 SortPriority: 0IncludeIsMainRegex: '([-_](test|unittest))?$'IncludeIsMainSourceRegex: ''IndentAccessModifiers: falseIndentCaseBlocks: trueIndentCaseLabels: trueIndentExternBlock: NoIndentIndentGotoLabels: falseIndentPPDirectives: AfterHashIndentWidth: 4IndentWrappedFunctionNames: falseInsertBraces: true # NOTE: may lead to incorrect formattingInsertNewlineAtEOF: trueJavaScriptQuotes: LeaveJavaScriptWrapImports: trueKeepEmptyLinesAtTheStartOfBlocks: falseLambdaBodyIndentation: SignatureLineEnding: LFMacroBlockBegin: ''MacroBlockEnd: ''MaxEmptyLinesToKeep: 1NamespaceIndentation: NoneObjCBinPackProtocolList: AutoObjCBlockIndentWidth: 4ObjCSpaceAfterProperty: trueObjCSpaceBeforeProtocolList: truePPIndentWidth: -1PackConstructorInitializers: CurrentLinePenaltyBreakAssignment: 2PenaltyBreakBeforeFirstCallParameter: 1PenaltyBreakComment: 300PenaltyBreakFirstLessLess: 120PenaltyBreakString: 1000PenaltyBreakTemplateDeclaration: 10PenaltyExcessCharacter: 1000000PenaltyReturnTypeOnItsOwnLine: 200PointerAlignment: MiddleQualifierAlignment: Left#QualifierOrder: ['static', 'inline', 'friend', 'constexpr', 'const', 'volatile', 'type', 'restrict']RawStringFormats: - Language: Cpp Delimiters: - cc - CC - cpp - Cpp - CPP - 'c++' - 'C++' CanonicalDelimiter: ''ReferenceAlignment: MiddleReflowComments: false # IndentOnlySeparateDefinitionBlocks: AlwaysSortIncludes: CaseInsensitiveSortUsingDeclarations: LexicographicNumericSpaceAfterCStyleCast: trueSpaceAfterLogicalNot: falseSpaceAfterTemplateKeyword: trueSpaceBeforeAssignmentOperators: trueSpaceBeforeCpp11BracedList: falseSpaceBeforeCtorInitializerColon: trueSpaceBeforeInheritanceColon: trueSpaceBeforeParens: ControlStatementsSpaceBeforeRangeBasedForLoopColon: trueSpaceInEmptyBlock: falseSpaceInEmptyParentheses: falseSpacesBeforeTrailingComments: 2SpacesInAngles: NeverSpacesInContainerLiterals: trueSpacesInLineCommentPrefix: Minimum: 1 Maximum: -1SpacesInParentheses: falseSpacesInSquareBrackets: falseSpaceBeforeSquareBrackets: falseStandard: c++17TabWidth: 4UseTab: NeverWhitespaceSensitiveMacros: ['STRINGIZE']...
12345678910111213141516171819202122232425262728---Checks: > bugprone-*, -bugprone-easily-swappable-parameters, -bugprone-implicit-widening-of-multiplication-result, -bugprone-misplaced-widening-cast, -bugprone-narrowing-conversions, readability-*, -readability-avoid-unconditional-preprocessor-if, -readability-function-cognitive-complexity, -readability-identifier-length, -readability-implicit-bool-conversion, -readability-magic-numbers, -readability-uppercase-literal-suffix, -readability-simplify-boolean-expr, -readability-math-missing-parentheses, clang-analyzer-*, -clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling, performance-*, -performance-enum-size, portability-*, -portability-simd-intrinsics, misc-*, -misc-const-correctness, -misc-non-private-member-variables-in-classes, -misc-no-recursion, -misc-use-anonymous-namespace,FormatStyle: none123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130# ==============================================================================# ARGUMENTS# ==============================================================================
# Define the CANN base image for easier version updates laterARG CHIP_TYPE=910bARG CANN_BASE_IMAGE=quay.io/ascend/cann:8.3.rc2-${CHIP_TYPE}-openeuler24.03-py3.11
# ==============================================================================# BUILD STAGE# Compile all binary files and libraries# ==============================================================================FROM ${CANN_BASE_IMAGE} AS build
# -- Install build dependencies --RUN yum install -y gcc g++ cmake make git openssl-devel python3 python3-pip && \ yum clean all && \ rm -rf /var/cache/yum
# -- Set the working directory --WORKDIR /app
# -- Copy project files --COPY . .
# -- Set CANN environment variables (required for compilation) --# Using ENV instead of `source` allows environment variables to persist across the entire image layerENV ASCEND_TOOLKIT_HOME=/usr/local/Ascend/ascend-toolkit/latestENV LD_LIBRARY_PATH=${ASCEND_TOOLKIT_HOME}/lib64:${LD_LIBRARY_PATH}ENV PATH=${ASCEND_TOOLKIT_HOME}/bin:${PATH}ENV ASCEND_OPP_PATH=${ASCEND_TOOLKIT_HOME}/oppENV LD_LIBRARY_PATH=${ASCEND_TOOLKIT_HOME}/runtime/lib64/stub:$LD_LIBRARY_PATH# ... You can add other environment variables from the original file as needed ...# For brevity, only core variables are listed here. You can paste the original ENV list here.
# -- Build llama.cpp --# Use the passed CHIP_TYPE argument and add general build optionsARG CHIP_TYPERUN source /usr/local/Ascend/ascend-toolkit/set_env.sh --force \ && \ cmake -B build \ -DGGML_CANN=ON \ -DCMAKE_BUILD_TYPE=Release \ -DSOC_TYPE=ascend${CHIP_TYPE} \ -DUSE_ACL_GRAPH=ON \ . && \ cmake --build build --config Release -j$(nproc)
# -- Organize build artifacts for copying in later stages --# Create a lib directory to store all .so filesRUN mkdir -p /app/lib && \ find build -name "*.so*" -exec cp -P {} /app/lib \;
# Create a full directory to store all executables and Python scriptsRUN mkdir -p /app/full && \ cp build/bin/* /app/full/ && \ cp *.py /app/full/ && \ cp -r gguf-py /app/full/ && \ cp -r requirements /app/full/ && \ cp requirements.txt /app/full/ # If you have a tools.sh script, make sure it is copied here # cp .devops/tools.sh /app/full/tools.sh
# ==============================================================================# BASE STAGE# Create a minimal base image with CANN runtime and common libraries# ==============================================================================FROM ${CANN_BASE_IMAGE} AS base
# -- Install runtime dependencies --RUN yum install -y libgomp curl && \ yum clean all && \ rm -rf /var/cache/yum
# -- Set CANN environment variables (required for runtime) --ENV ASCEND_TOOLKIT_HOME=/usr/local/Ascend/ascend-toolkit/latestENV LD_LIBRARY_PATH=/app:${ASCEND_TOOLKIT_HOME}/lib64:${LD_LIBRARY_PATH}ENV PATH=${ASCEND_TOOLKIT_HOME}/bin:${PATH}ENV ASCEND_OPP_PATH=${ASCEND_TOOLKIT_HOME}/opp# ... You can add other environment variables from the original file as needed ...
WORKDIR /app
# Copy compiled .so files from the build stageCOPY --from=build /app/lib/ /app
# ==============================================================================# FINAL STAGES (TARGETS)# ==============================================================================
### Target: full# Complete image with all tools, Python bindings, and dependencies# ==============================================================================FROM base AS full
COPY --from=build /app/full /app
# Install Python dependenciesRUN yum install -y git python3 python3-pip && \ pip3 install --no-cache-dir --upgrade pip setuptools wheel && \ pip3 install --no-cache-dir -r requirements.txt && \ yum clean all && \ rm -rf /var/cache/yum
# You need to provide a tools.sh script as the entrypointENTRYPOINT ["/app/tools.sh"]# If there is no tools.sh, you can set the default to start the server# ENTRYPOINT ["/app/llama-server"]
### Target: light# Lightweight image containing only llama-cli and llama-completion# ==============================================================================FROM base AS light
COPY --from=build /app/full/llama-cli /app/full/llama-completion /app
ENTRYPOINT [ "/app/llama-cli" ]
### Target: server# Dedicated server image containing only llama-server# ==============================================================================FROM base AS server
ENV LLAMA_ARG_HOST=0.0.0.0
COPY --from=build /app/full/llama-server /app
HEALTHCHECK --interval=5m CMD [ "curl", "-f", "http://localhost:8080/health" ]
ENTRYPOINT [ "/app/llama-server" ]12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788ARG UBUNTU_VERSION=22.04
FROM ubuntu:$UBUNTU_VERSION AS build
ARG TARGETARCH
RUN apt-get update && \ apt-get install -y build-essential git cmake libssl-dev
WORKDIR /app
COPY . .
RUN if [ "$TARGETARCH" = "amd64" ] || [ "$TARGETARCH" = "arm64" ]; then \ cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DGGML_NATIVE=OFF -DLLAMA_BUILD_TESTS=OFF -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON; \ else \ echo "Unsupported architecture"; \ exit 1; \ fi && \ cmake --build build -j $(nproc)
RUN mkdir -p /app/lib && \ find build -name "*.so*" -exec cp -P {} /app/lib \;
RUN mkdir -p /app/full \ && cp build/bin/* /app/full \ && cp *.py /app/full \ && cp -r gguf-py /app/full \ && cp -r requirements /app/full \ && cp requirements.txt /app/full \ && cp .devops/tools.sh /app/full/tools.sh
## Base imageFROM ubuntu:$UBUNTU_VERSION AS base
RUN apt-get update \ && apt-get install -y libgomp1 curl\ && apt autoremove -y \ && apt clean -y \ && rm -rf /tmp/* /var/tmp/* \ && find /var/cache/apt/archives /var/lib/apt/lists -not -name lock -type f -delete \ && find /var/cache -type f -delete
COPY --from=build /app/lib/ /app
### FullFROM base AS full
COPY --from=build /app/full /app
WORKDIR /app
RUN apt-get update \ && apt-get install -y \ git \ python3 \ python3-pip \ && pip install --upgrade pip setuptools wheel \ && pip install -r requirements.txt \ && apt autoremove -y \ && apt clean -y \ && rm -rf /tmp/* /var/tmp/* \ && find /var/cache/apt/archives /var/lib/apt/lists -not -name lock -type f -delete \ && find /var/cache -type f -delete
ENTRYPOINT ["/app/tools.sh"]
### Light, CLI onlyFROM base AS light
COPY --from=build /app/full/llama-cli /app/full/llama-completion /app
WORKDIR /app
ENTRYPOINT [ "/app/llama-cli" ]
### Server, Server onlyFROM base AS server
ENV LLAMA_ARG_HOST=0.0.0.0
COPY --from=build /app/full/llama-server /app
WORKDIR /app
HEALTHCHECK CMD [ "curl", "-f", "http://localhost:8080/health" ]
ENTRYPOINT [ "/app/llama-server" ]1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495ARG UBUNTU_VERSION=24.04# This needs to generally match the container host's environment.ARG CUDA_VERSION=13.1.0# Target the CUDA build imageARG BASE_CUDA_DEV_CONTAINER=nvidia/cuda:${CUDA_VERSION}-devel-ubuntu${UBUNTU_VERSION}
ARG BASE_CUDA_RUN_CONTAINER=nvidia/cuda:${CUDA_VERSION}-runtime-ubuntu${UBUNTU_VERSION}
FROM ${BASE_CUDA_DEV_CONTAINER} AS build
# CUDA architecture to build for (defaults to all supported archs)ARG CUDA_DOCKER_ARCH=default
RUN apt-get update && \ apt-get install -y build-essential cmake python3 python3-pip git libssl-dev libgomp1
WORKDIR /app
COPY . .
RUN if [ "${CUDA_DOCKER_ARCH}" != "default" ]; then \ export CMAKE_ARGS="-DCMAKE_CUDA_ARCHITECTURES=${CUDA_DOCKER_ARCH}"; \ fi && \ cmake -B build -DGGML_NATIVE=OFF -DGGML_CUDA=ON -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON -DLLAMA_BUILD_TESTS=OFF ${CMAKE_ARGS} -DCMAKE_EXE_LINKER_FLAGS=-Wl,--allow-shlib-undefined . && \ cmake --build build --config Release -j$(nproc)
RUN mkdir -p /app/lib && \ find build -name "*.so*" -exec cp -P {} /app/lib \;
RUN mkdir -p /app/full \ && cp build/bin/* /app/full \ && cp *.py /app/full \ && cp -r gguf-py /app/full \ && cp -r requirements /app/full \ && cp requirements.txt /app/full \ && cp .devops/tools.sh /app/full/tools.sh
## Base imageFROM ${BASE_CUDA_RUN_CONTAINER} AS base
RUN apt-get update \ && apt-get install -y libgomp1 curl\ && apt autoremove -y \ && apt clean -y \ && rm -rf /tmp/* /var/tmp/* \ && find /var/cache/apt/archives /var/lib/apt/lists -not -name lock -type f -delete \ && find /var/cache -type f -delete
COPY --from=build /app/lib/ /app
### FullFROM base AS full
COPY --from=build /app/full /app
WORKDIR /app
RUN apt-get update \ && apt-get install -y \ git \ python3 \ python3-pip \ python3-wheel \ && pip install --break-system-packages --upgrade setuptools \ && pip install --break-system-packages -r requirements.txt \ && apt autoremove -y \ && apt clean -y \ && rm -rf /tmp/* /var/tmp/* \ && find /var/cache/apt/archives /var/lib/apt/lists -not -name lock -type f -delete \ && find /var/cache -type f -delete
ENTRYPOINT ["/app/tools.sh"]
### Light, CLI onlyFROM base AS light
COPY --from=build /app/full/llama-cli /app/full/llama-completion /app
WORKDIR /app
ENTRYPOINT [ "/app/llama-cli" ]
### Server, Server onlyFROM base AS server
ENV LLAMA_ARG_HOST=0.0.0.0
COPY --from=build /app/full/llama-server /app
WORKDIR /app
HEALTHCHECK CMD [ "curl", "-f", "http://localhost:8080/health" ]
ENTRYPOINT [ "/app/llama-server" ]12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394ARG UBUNTU_VERSION=22.04# This needs to generally match the container host's environment.ARG CUDA_VERSION=12.4.0# Target the CUDA build imageARG BASE_CUDA_DEV_CONTAINER=nvidia/cuda:${CUDA_VERSION}-devel-ubuntu${UBUNTU_VERSION}
ARG BASE_CUDA_RUN_CONTAINER=nvidia/cuda:${CUDA_VERSION}-runtime-ubuntu${UBUNTU_VERSION}
FROM ${BASE_CUDA_DEV_CONTAINER} AS build
# CUDA architecture to build for (defaults to all supported archs)ARG CUDA_DOCKER_ARCH=default
RUN apt-get update && \ apt-get install -y build-essential cmake python3 python3-pip git libssl-dev libgomp1
WORKDIR /app
COPY . .
RUN if [ "${CUDA_DOCKER_ARCH}" != "default" ]; then \ export CMAKE_ARGS="-DCMAKE_CUDA_ARCHITECTURES=${CUDA_DOCKER_ARCH}"; \ fi && \ cmake -B build -DGGML_NATIVE=OFF -DGGML_CUDA=ON -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON -DLLAMA_BUILD_TESTS=OFF ${CMAKE_ARGS} -DCMAKE_EXE_LINKER_FLAGS=-Wl,--allow-shlib-undefined . && \ cmake --build build --config Release -j$(nproc)
RUN mkdir -p /app/lib && \ find build -name "*.so*" -exec cp -P {} /app/lib \;
RUN mkdir -p /app/full \ && cp build/bin/* /app/full \ && cp *.py /app/full \ && cp -r gguf-py /app/full \ && cp -r requirements /app/full \ && cp requirements.txt /app/full \ && cp .devops/tools.sh /app/full/tools.sh
## Base imageFROM ${BASE_CUDA_RUN_CONTAINER} AS base
RUN apt-get update \ && apt-get install -y libgomp1 curl\ && apt autoremove -y \ && apt clean -y \ && rm -rf /tmp/* /var/tmp/* \ && find /var/cache/apt/archives /var/lib/apt/lists -not -name lock -type f -delete \ && find /var/cache -type f -delete
COPY --from=build /app/lib/ /app
### FullFROM base AS full
COPY --from=build /app/full /app
WORKDIR /app
RUN apt-get update \ && apt-get install -y \ git \ python3 \ python3-pip \ && pip install --upgrade pip setuptools wheel \ && pip install --break-system-packages -r requirements.txt \ && apt autoremove -y \ && apt clean -y \ && rm -rf /tmp/* /var/tmp/* \ && find /var/cache/apt/archives /var/lib/apt/lists -not -name lock -type f -delete \ && find /var/cache -type f -delete
ENTRYPOINT ["/app/tools.sh"]
### Light, CLI onlyFROM base AS light
COPY --from=build /app/full/llama-cli /app/full/llama-completion /app
WORKDIR /app
ENTRYPOINT [ "/app/llama-cli" ]
### Server, Server onlyFROM base AS server
ENV LLAMA_ARG_HOST=0.0.0.0
COPY --from=build /app/full/llama-server /app
WORKDIR /app
HEALTHCHECK CMD [ "curl", "-f", "http://localhost:8080/health" ]
ENTRYPOINT [ "/app/llama-server" ]1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495ARG ONEAPI_VERSION=2025.2.2-0-devel-ubuntu24.04
## Build Image
FROM intel/deep-learning-essentials:$ONEAPI_VERSION AS build
ARG GGML_SYCL_F16=OFFRUN apt-get update && \ apt-get install -y git libssl-dev
WORKDIR /app
COPY . .
RUN if [ "${GGML_SYCL_F16}" = "ON" ]; then \ echo "GGML_SYCL_F16 is set" \ && export OPT_SYCL_F16="-DGGML_SYCL_F16=ON"; \ fi && \ echo "Building with dynamic libs" && \ cmake -B build -DGGML_NATIVE=OFF -DGGML_SYCL=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON -DLLAMA_BUILD_TESTS=OFF ${OPT_SYCL_F16} && \ cmake --build build --config Release -j$(nproc)
RUN mkdir -p /app/lib && \ find build -name "*.so*" -exec cp -P {} /app/lib \;
RUN mkdir -p /app/full \ && cp build/bin/* /app/full \ && cp *.py /app/full \ && cp -r gguf-py /app/full \ && cp -r requirements /app/full \ && cp requirements.txt /app/full \ && cp .devops/tools.sh /app/full/tools.sh
FROM intel/deep-learning-essentials:$ONEAPI_VERSION AS base
RUN apt-get update \ && apt-get install -y libgomp1 curl\ && apt autoremove -y \ && apt clean -y \ && rm -rf /tmp/* /var/tmp/* \ && find /var/cache/apt/archives /var/lib/apt/lists -not -name lock -type f -delete \ && find /var/cache -type f -delete
### FullFROM base AS full
COPY --from=build /app/lib/ /appCOPY --from=build /app/full /app
WORKDIR /app
RUN apt-get update && \ apt-get install -y \ git \ python3 \ python3-pip \ python3-venv && \ python3 -m venv /opt/venv && \ . /opt/venv/bin/activate && \ pip install --upgrade pip setuptools wheel && \ pip install -r requirements.txt && \ apt autoremove -y && \ apt clean -y && \ rm -rf /tmp/* /var/tmp/* && \ find /var/cache/apt/archives /var/lib/apt/lists -not -name lock -type f -delete && \ find /var/cache -type f -delete
ENV PATH="/opt/venv/bin:$PATH"
ENTRYPOINT ["/app/tools.sh"]
### Light, CLI onlyFROM base AS light
COPY --from=build /app/lib/ /appCOPY --from=build /app/full/llama-cli /app/full/llama-completion /app
WORKDIR /app
ENTRYPOINT [ "/app/llama-cli" ]
### Server, Server onlyFROM base AS server
ENV LLAMA_ARG_HOST=0.0.0.0
COPY --from=build /app/lib/ /appCOPY --from=build /app/full/llama-server /app
WORKDIR /app
HEALTHCHECK CMD [ "curl", "-f", "http://localhost:8080/health" ]
ENTRYPOINT [ "/app/llama-server" ]
123456789101112131415161718192021222324252627282930313233343536373839404142434445ARG ASCEND_VERSION=8.1.RC1.alpha001-910b-openeuler22.03-py3.10
FROM ascendai/cann:$ASCEND_VERSION AS build
WORKDIR /app
COPY . .
RUN yum install -y gcc g++ cmake make openssl-develENV ASCEND_TOOLKIT_HOME=/usr/local/Ascend/ascend-toolkit/latestENV LIBRARY_PATH=${ASCEND_TOOLKIT_HOME}/lib64:$LIBRARY_PATHENV LD_LIBRARY_PATH=${ASCEND_TOOLKIT_HOME}/lib64:${ASCEND_TOOLKIT_HOME}/lib64/plugin/opskernel:${ASCEND_TOOLKIT_HOME}/lib64/plugin/nnengine:${ASCEND_TOOLKIT_HOME}/opp/built-in/op_impl/ai_core/tbe/op_tiling:${LD_LIBRARY_PATH}ENV PYTHONPATH=${ASCEND_TOOLKIT_HOME}/python/site-packages:${ASCEND_TOOLKIT_HOME}/opp/built-in/op_impl/ai_core/tbe:${PYTHONPATH}ENV PATH=${ASCEND_TOOLKIT_HOME}/bin:${ASCEND_TOOLKIT_HOME}/compiler/ccec_compiler/bin:${PATH}ENV ASCEND_AICPU_PATH=${ASCEND_TOOLKIT_HOME}ENV ASCEND_OPP_PATH=${ASCEND_TOOLKIT_HOME}/oppENV TOOLCHAIN_HOME=${ASCEND_TOOLKIT_HOME}/toolkitENV ASCEND_HOME_PATH=${ASCEND_TOOLKIT_HOME}
# find libascend_hal.so, because the drive hasn`t been mounted.ENV LD_LIBRARY_PATH=${ASCEND_TOOLKIT_HOME}/runtime/lib64/stub:$LD_LIBRARY_PATH
RUN echo "Building with static libs" && \ source /usr/local/Ascend/ascend-toolkit/set_env.sh --force && \ cmake -B build -DGGML_NATIVE=OFF -DGGML_CANN=ON -DBUILD_SHARED_LIBS=OFF -DLLAMA_BUILD_TESTS=OFF && \ cmake --build build --config Release --target llama-cli && \ cmake --build build --config Release --target llama-completion
# TODO: use image with NNRTFROM ascendai/cann:$ASCEND_VERSION AS runtimeCOPY --from=build /app/build/bin/llama-cli /app/build/bin/llama-completion /
ENV LC_ALL=C.utf8
ENV ASCEND_TOOLKIT_HOME=/usr/local/Ascend/ascend-toolkit/latestENV LIBRARY_PATH=${ASCEND_TOOLKIT_HOME}/lib64:$LIBRARY_PATHENV LD_LIBRARY_PATH=${ASCEND_TOOLKIT_HOME}/lib64:${ASCEND_TOOLKIT_HOME}/lib64/plugin/opskernel:${ASCEND_TOOLKIT_HOME}/lib64/plugin/nnengine:${ASCEND_TOOLKIT_HOME}/opp/built-in/op_impl/ai_core/tbe/op_tiling:${LD_LIBRARY_PATH}ENV PYTHONPATH=${ASCEND_TOOLKIT_HOME}/python/site-packages:${ASCEND_TOOLKIT_HOME}/opp/built-in/op_impl/ai_core/tbe:${PYTHONPATH}ENV PATH=${ASCEND_TOOLKIT_HOME}/bin:${ASCEND_TOOLKIT_HOME}/compiler/ccec_compiler/bin:${PATH}ENV ASCEND_AICPU_PATH=${ASCEND_TOOLKIT_HOME}ENV ASCEND_OPP_PATH=${ASCEND_TOOLKIT_HOME}/oppENV TOOLCHAIN_HOME=${ASCEND_TOOLKIT_HOME}/toolkitENV ASCEND_HOME_PATH=${ASCEND_TOOLKIT_HOME}
ENTRYPOINT ["/llama-cli" ]12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485# SRPM for building from source and packaging an RPM for RPM-based distros.# https://docs.fedoraproject.org/en-US/quick-docs/creating-rpm-packages# Built and maintained by John Boero - boeroboy@gmail.com# In honor of Seth Vidal https://www.redhat.com/it/blog/thank-you-seth-vidal
# Notes for llama.cpp:# 1. Tags are currently based on hash - which will not sort asciibetically.# We need to declare standard versioning if people want to sort latest releases.# 2. Builds for CUDA/OpenCL support are separate, with different depenedencies.# 3. NVidia's developer repo must be enabled with nvcc, cublas, clblas, etc installed.# Example: https://developer.download.nvidia.com/compute/cuda/repos/fedora37/x86_64/cuda-fedora37.repo# 4. OpenCL/CLBLAST support simply requires the ICD loader and basic opencl libraries.# It is up to the user to install the correct vendor-specific support.
Name: llama.cpp-cudaVersion: %( date "+%%Y%%m%%d" )Release: 1%{?dist}Summary: CPU Inference of LLaMA model in pure C/C++ (no CUDA/OpenCL)License: MITSource0: https://github.com/ggml-org/llama.cpp/archive/refs/heads/master.tar.gzBuildRequires: coreutils make gcc-c++ git cuda-toolkitRequires: cuda-toolkitURL: https://github.com/ggml-org/llama.cpp
%define debug_package %{nil}%define source_date_epoch_from_changelog 0
%descriptionCPU inference for Meta's Lllama2 models using default options.
%prep%setup -n llama.cpp-master
%buildmake -j GGML_CUDA=1
%installmkdir -p %{buildroot}%{_bindir}/cp -p llama-cli %{buildroot}%{_bindir}/llama-cuda-clicp -p llama-completion %{buildroot}%{_bindir}/llama-cuda-completioncp -p llama-server %{buildroot}%{_bindir}/llama-cuda-servercp -p llama-simple %{buildroot}%{_bindir}/llama-cuda-simple
mkdir -p %{buildroot}/usr/lib/systemd/system%{__cat} <<EOF > %{buildroot}/usr/lib/systemd/system/llamacuda.service[Unit]Description=Llama.cpp server, CPU only (no GPU support in this build).After=syslog.target network.target local-fs.target remote-fs.target nss-lookup.target
[Service]Type=simpleEnvironmentFile=/etc/sysconfig/llamaExecStart=/usr/bin/llama-cuda-server $LLAMA_ARGSExecReload=/bin/kill -s HUP $MAINPIDRestart=never
[Install]WantedBy=default.targetEOF
mkdir -p %{buildroot}/etc/sysconfig%{__cat} <<EOF > %{buildroot}/etc/sysconfig/llamaLLAMA_ARGS="-m /opt/llama2/ggml-model-f32.bin"EOF
%cleanrm -rf %{buildroot}rm -rf %{_builddir}/*
%files%{_bindir}/llama-cuda-cli%{_bindir}/llama-cuda-completion%{_bindir}/llama-cuda-server%{_bindir}/llama-cuda-simple/usr/lib/systemd/system/llamacuda.service%config /etc/sysconfig/llama
%pre
%post
%preun%postun
%changelog123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687# SRPM for building from source and packaging an RPM for RPM-based distros.# https://docs.fedoraproject.org/en-US/quick-docs/creating-rpm-packages# Built and maintained by John Boero - boeroboy@gmail.com# In honor of Seth Vidal https://www.redhat.com/it/blog/thank-you-seth-vidal
# Notes for llama.cpp:# 1. Tags are currently based on hash - which will not sort asciibetically.# We need to declare standard versioning if people want to sort latest releases.# In the meantime, YYYYMMDD format will be used.# 2. Builds for CUDA/OpenCL support are separate, with different depenedencies.# 3. NVidia's developer repo must be enabled with nvcc, cublas, clblas, etc installed.# Example: https://developer.download.nvidia.com/compute/cuda/repos/fedora37/x86_64/cuda-fedora37.repo# 4. OpenCL/CLBLAST support simply requires the ICD loader and basic opencl libraries.# It is up to the user to install the correct vendor-specific support.
Name: llama.cppVersion: %( date "+%%Y%%m%%d" )Release: 1%{?dist}Summary: CPU Inference of LLaMA model in pure C/C++ (no CUDA/OpenCL)License: MITSource0: https://github.com/ggml-org/llama.cpp/archive/refs/heads/master.tar.gzBuildRequires: coreutils make gcc-c++ git libstdc++-develRequires: libstdc++URL: https://github.com/ggml-org/llama.cpp
%define debug_package %{nil}%define source_date_epoch_from_changelog 0
%descriptionCPU inference for Meta's Lllama2 models using default options.Models are not included in this package and must be downloaded separately.
%prep%setup -n llama.cpp-master
%buildmake -j
%installmkdir -p %{buildroot}%{_bindir}/cp -p llama-cli %{buildroot}%{_bindir}/llama-clicp -p llama-completion %{buildroot}%{_bindir}/llama-completioncp -p llama-server %{buildroot}%{_bindir}/llama-servercp -p llama-simple %{buildroot}%{_bindir}/llama-simple
mkdir -p %{buildroot}/usr/lib/systemd/system%{__cat} <<EOF > %{buildroot}/usr/lib/systemd/system/llama.service[Unit]Description=Llama.cpp server, CPU only (no GPU support in this build).After=syslog.target network.target local-fs.target remote-fs.target nss-lookup.target
[Service]Type=simpleEnvironmentFile=/etc/sysconfig/llamaExecStart=/usr/bin/llama-server $LLAMA_ARGSExecReload=/bin/kill -s HUP $MAINPIDRestart=never
[Install]WantedBy=default.targetEOF
mkdir -p %{buildroot}/etc/sysconfig%{__cat} <<EOF > %{buildroot}/etc/sysconfig/llamaLLAMA_ARGS="-m /opt/llama2/ggml-model-f32.bin"EOF
%cleanrm -rf %{buildroot}rm -rf %{_builddir}/*
%files%{_bindir}/llama-cli%{_bindir}/llama-completion%{_bindir}/llama-server%{_bindir}/llama-simple/usr/lib/systemd/system/llama.service%config /etc/sysconfig/llama
%pre
%post
%preun%postun
%changelog123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101ARG UBUNTU_VERSION=22.04# This needs to generally match the container host's environment.ARG MUSA_VERSION=rc4.3.0# Target the MUSA build imageARG BASE_MUSA_DEV_CONTAINER=mthreads/musa:${MUSA_VERSION}-devel-ubuntu${UBUNTU_VERSION}-amd64
ARG BASE_MUSA_RUN_CONTAINER=mthreads/musa:${MUSA_VERSION}-runtime-ubuntu${UBUNTU_VERSION}-amd64
FROM ${BASE_MUSA_DEV_CONTAINER} AS build
# MUSA architecture to build for (defaults to all supported archs)ARG MUSA_DOCKER_ARCH=default
RUN apt-get update && \ apt-get install -y \ build-essential \ cmake \ python3 \ python3-pip \ git \ libssl-dev \ libgomp1
WORKDIR /app
COPY . .
RUN if [ "${MUSA_DOCKER_ARCH}" != "default" ]; then \ export CMAKE_ARGS="-DMUSA_ARCHITECTURES=${MUSA_DOCKER_ARCH}"; \ fi && \ cmake -B build -DGGML_NATIVE=OFF -DGGML_MUSA=ON -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON -DLLAMA_BUILD_TESTS=OFF ${CMAKE_ARGS} -DCMAKE_EXE_LINKER_FLAGS=-Wl,--allow-shlib-undefined . && \ cmake --build build --config Release -j$(nproc)
RUN mkdir -p /app/lib && \ find build -name "*.so*" -exec cp -P {} /app/lib \;
RUN mkdir -p /app/full \ && cp build/bin/* /app/full \ && cp *.py /app/full \ && cp -r gguf-py /app/full \ && cp -r requirements /app/full \ && cp requirements.txt /app/full \ && cp .devops/tools.sh /app/full/tools.sh
## Base imageFROM ${BASE_MUSA_RUN_CONTAINER} AS base
RUN apt-get update \ && apt-get install -y libgomp1 curl\ && apt autoremove -y \ && apt clean -y \ && rm -rf /tmp/* /var/tmp/* \ && find /var/cache/apt/archives /var/lib/apt/lists -not -name lock -type f -delete \ && find /var/cache -type f -delete
COPY --from=build /app/lib/ /app
### FullFROM base AS full
COPY --from=build /app/full /app
WORKDIR /app
RUN apt-get update \ && apt-get install -y \ git \ python3 \ python3-pip \ && pip install --upgrade pip setuptools wheel \ && pip install -r requirements.txt \ && apt autoremove -y \ && apt clean -y \ && rm -rf /tmp/* /var/tmp/* \ && find /var/cache/apt/archives /var/lib/apt/lists -not -name lock -type f -delete \ && find /var/cache -type f -delete
ENTRYPOINT ["/app/tools.sh"]
### Light, CLI onlyFROM base AS light
COPY --from=build /app/full/llama-cli /app/full/llama-completion /app
WORKDIR /app
ENTRYPOINT [ "/app/llama-cli" ]
### Server, Server onlyFROM base AS server
ENV LLAMA_ARG_HOST=0.0.0.0
COPY --from=build /app/full/llama-server /app
WORKDIR /app
HEALTHCHECK CMD [ "curl", "-f", "http://localhost:8080/health" ]
ENTRYPOINT [ "/app/llama-server" ]123456789101112131415161718192021{ perSystem = { config, lib, ... }: { apps = let inherit (config.packages) default; binaries = [ "llama-cli" "llama-embedding" "llama-server" "llama-quantize" ]; mkApp = name: { type = "app"; program = "${default}/bin/${name}"; }; in lib.genAttrs binaries mkApp; };}12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152{ inputs, ... }:
{ perSystem = { config, lib, system, ... }: { devShells = let pkgs = import inputs.nixpkgs { inherit system; }; stdenv = pkgs.stdenv; scripts = config.packages.python-scripts; in lib.pipe (config.packages) [ (lib.concatMapAttrs ( name: package: { ${name} = pkgs.mkShell { name = "${name}"; inputsFrom = [ package ]; shellHook = '' echo "Entering ${name} devShell" ''; }; "${name}-extra" = if (name == "python-scripts") then null else pkgs.mkShell { name = "${name}-extra"; inputsFrom = [ package scripts ]; # Extra packages that *may* be used by some scripts packages = [ pkgs.python3Packages.tiktoken ]; shellHook = '' echo "Entering ${name} devShell" addToSearchPath "LD_LIBRARY_PATH" "${lib.getLib stdenv.cc.cc}/lib" ''; }; } )) (lib.filterAttrs (name: value: value != null)) ]; };}12345678910111213141516171819202122232425262728293031323334353637{ lib, dockerTools, buildEnv, llama-cpp, interactive ? true, coreutils,}:
# A tar that can be fed into `docker load`:## $ nix build .#llamaPackages.docker# $ docker load < result
# For details and variations cf.# - https://nixos.org/manual/nixpkgs/unstable/#ssec-pkgs-dockerTools-buildLayeredImage# - https://discourse.nixos.org/t/a-faster-dockertools-buildimage-prototype/16922# - https://nixery.dev/
# Approximate (compressed) sizes, at the time of writing, are:## .#llamaPackages.docker: 125M;# .#llamaPackagesCuda.docker: 537M;# .#legacyPackages.aarch64-linux.llamaPackagesXavier.docker: 415M.
dockerTools.buildLayeredImage { name = llama-cpp.pname; tag = "latest";
contents = [ llama-cpp ] ++ lib.optionals interactive [ coreutils dockerTools.binSh dockerTools.caCertificates ];}123456789101112131415161718192021222324252627282930313233343536373839{ inputs, ... }:{ perSystem = { config, system, lib, pkgsCuda, ... }: { legacyPackages = let caps.llamaPackagesXavier = "7.2"; caps.llamaPackagesOrin = "8.7"; caps.llamaPackagesTX2 = "6.2"; caps.llamaPackagesNano = "5.3";
pkgsFor = cap: import inputs.nixpkgs { inherit system; config = { cudaSupport = true; cudaCapabilities = [ cap ]; cudaEnableForwardCompat = false; inherit (pkgsCuda.config) allowUnfreePredicate; }; }; in builtins.mapAttrs (name: cap: (pkgsFor cap).callPackage ./scope.nix { }) caps;
packages = lib.optionalAttrs (system == "aarch64-linux") { jetson-xavier = config.legacyPackages.llamaPackagesXavier.llama-cpp; jetson-orin = config.legacyPackages.llamaPackagesOrin.llama-cpp; jetson-nano = config.legacyPackages.llamaPackagesNano.llama-cpp; }; };}123456789101112131415161718192021222324252627282930313233343536373839404142434445{ inputs, ... }:{ # The _module.args definitions are passed on to modules as arguments. E.g. # the module `{ pkgs ... }: { /* config */ }` implicitly uses # `_module.args.pkgs` (defined in this case by flake-parts). perSystem = { lib, system, ... }: { _module.args = { # Note: bringing up https://zimbatm.com/notes/1000-instances-of-nixpkgs # again, the below creates several nixpkgs instances which the # flake-centric CLI will be forced to evaluate e.g. on `nix flake show`. # # This is currently "slow" and "expensive", on a certain scale. # This also isn't "right" in that this hinders dependency injection at # the level of flake inputs. This might get removed in the foreseeable # future. # # Note that you can use these expressions without Nix # (`pkgs.callPackage ./devops/nix/scope.nix { }` is the entry point).
pkgsCuda = import inputs.nixpkgs { inherit system; # Ensure dependencies use CUDA consistently (e.g. that openmpi, ucc, # and ucx are built with CUDA support) config.cudaSupport = true; config.allowUnfreePredicate = p: builtins.all ( license: license.free || builtins.elem license.shortName [ "CUDA EULA" "cuDNN EULA" ] ) (p.meta.licenses or (lib.toList p.meta.license)); }; # Ensure dependencies use ROCm consistently pkgsRocm = import inputs.nixpkgs { inherit system; config.rocmSupport = true; }; }; };}1234567891011121314151617181920212223242526272829303132333435363738{ lib, llamaVersion, numpy, tqdm, requests, sentencepiece, pyyaml, poetry-core, buildPythonPackage, pytestCheckHook,}:
buildPythonPackage { pname = "gguf"; version = llamaVersion; pyproject = true; nativeBuildInputs = [ poetry-core ]; propagatedBuildInputs = [ numpy tqdm sentencepiece pyyaml requests ]; src = lib.cleanSource ../../gguf-py; pythonImportsCheck = [ "numpy" "gguf" ]; nativeCheckInputs = [ pytestCheckHook ]; doCheck = true; meta = with lib; { description = "Python package for writing binary files in the GGUF format"; license = licenses.mit; maintainers = [ maintainers.ditsuke ]; };}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243{ lib, glibc, config, stdenv, runCommand, cmake, ninja, pkg-config, git, mpi, blas, cudaPackages, autoAddDriverRunpath, darwin, rocmPackages, vulkan-headers, vulkan-loader, curl, shaderc, useBlas ? builtins.all (x: !x) [ useCuda useMetalKit useRocm useVulkan ] && blas.meta.available, useCuda ? config.cudaSupport, useMetalKit ? stdenv.isAarch64 && stdenv.isDarwin, # Increases the runtime closure size by ~700M useMpi ? false, useRocm ? config.rocmSupport, rocmGpuTargets ? builtins.concatStringsSep ";" rocmPackages.clr.gpuTargets, useVulkan ? false, useRpc ? false, llamaVersion ? "0.0.0", # Arbitrary version, substituted by the flake
# It's necessary to consistently use backendStdenv when building with CUDA support, # otherwise we get libstdc++ errors downstream. effectiveStdenv ? if useCuda then cudaPackages.backendStdenv else stdenv, enableStatic ? effectiveStdenv.hostPlatform.isStatic, precompileMetalShaders ? false,}:
let inherit (lib) cmakeBool cmakeFeature optionalAttrs optionals strings ;
stdenv = throw "Use effectiveStdenv instead";
suffices = lib.optionals useBlas [ "BLAS" ] ++ lib.optionals useCuda [ "CUDA" ] ++ lib.optionals useMetalKit [ "MetalKit" ] ++ lib.optionals useMpi [ "MPI" ] ++ lib.optionals useRocm [ "ROCm" ] ++ lib.optionals useVulkan [ "Vulkan" ];
pnameSuffix = strings.optionalString (suffices != [ ]) "-${strings.concatMapStringsSep "-" strings.toLower suffices}"; descriptionSuffix = strings.optionalString ( suffices != [ ] ) ", accelerated with ${strings.concatStringsSep ", " suffices}";
xcrunHost = runCommand "xcrunHost" { } '' mkdir -p $out/bin ln -s /usr/bin/xcrun $out/bin '';
# apple_sdk is supposed to choose sane defaults, no need to handle isAarch64 # separately darwinBuildInputs = with darwin.apple_sdk.frameworks; [ Accelerate CoreVideo CoreGraphics ] ++ optionals useMetalKit [ MetalKit ];
cudaBuildInputs = with cudaPackages; [ cuda_cudart cuda_cccl # <nv/target> libcublas ];
rocmBuildInputs = with rocmPackages; [ clr hipblas rocblas ];
vulkanBuildInputs = [ vulkan-headers vulkan-loader shaderc ];in
effectiveStdenv.mkDerivation (finalAttrs: { pname = "llama-cpp${pnameSuffix}"; version = llamaVersion;
# Note: none of the files discarded here are visible in the sandbox or # affect the output hash. This also means they can be modified without # triggering a rebuild. src = lib.cleanSourceWith { filter = name: type: let noneOf = builtins.all (x: !x); baseName = baseNameOf name; in noneOf [ (lib.hasSuffix ".nix" name) # Ignore *.nix files when computing outPaths (lib.hasSuffix ".md" name) # Ignore *.md changes whe computing outPaths (lib.hasPrefix "." baseName) # Skip hidden files and directories (baseName == "flake.lock") ]; src = lib.cleanSource ../../.; };
postPatch = '' '';
# With PR#6015 https://github.com/ggml-org/llama.cpp/pull/6015, # `default.metallib` may be compiled with Metal compiler from XCode # and we need to escape sandbox on MacOS to access Metal compiler. # `xcrun` is used find the path of the Metal compiler, which is varible # and not on $PATH # see https://github.com/ggml-org/llama.cpp/pull/6118 for discussion __noChroot = effectiveStdenv.isDarwin && useMetalKit && precompileMetalShaders;
nativeBuildInputs = [ cmake ninja pkg-config git ] ++ optionals useCuda [ cudaPackages.cuda_nvcc
autoAddDriverRunpath ] ++ optionals (effectiveStdenv.hostPlatform.isGnu && enableStatic) [ glibc.static ] ++ optionals (effectiveStdenv.isDarwin && useMetalKit && precompileMetalShaders) [ xcrunHost ];
buildInputs = optionals effectiveStdenv.isDarwin darwinBuildInputs ++ optionals useCuda cudaBuildInputs ++ optionals useMpi [ mpi ] ++ optionals useRocm rocmBuildInputs ++ optionals useBlas [ blas ] ++ optionals useVulkan vulkanBuildInputs;
cmakeFlags = [ (cmakeBool "LLAMA_BUILD_SERVER" true) (cmakeBool "BUILD_SHARED_LIBS" (!enableStatic)) (cmakeBool "CMAKE_SKIP_BUILD_RPATH" true) (cmakeBool "GGML_NATIVE" false) (cmakeBool "GGML_BLAS" useBlas) (cmakeBool "GGML_CUDA" useCuda) (cmakeBool "GGML_HIP" useRocm) (cmakeBool "GGML_METAL" useMetalKit) (cmakeBool "GGML_VULKAN" useVulkan) (cmakeBool "GGML_STATIC" enableStatic) (cmakeBool "GGML_RPC" useRpc) ] ++ optionals useCuda [ ( with cudaPackages.flags; cmakeFeature "CMAKE_CUDA_ARCHITECTURES" ( builtins.concatStringsSep ";" (map dropDot cudaCapabilities) ) ) ] ++ optionals useRocm [ (cmakeFeature "CMAKE_HIP_COMPILER" "${rocmPackages.llvm.clang}/bin/clang") (cmakeFeature "CMAKE_HIP_ARCHITECTURES" rocmGpuTargets) ] ++ optionals useMetalKit [ (lib.cmakeFeature "CMAKE_C_FLAGS" "-D__ARM_FEATURE_DOTPROD=1") (cmakeBool "GGML_METAL_EMBED_LIBRARY" (!precompileMetalShaders)) ];
# Environment variables needed for ROCm env = optionalAttrs useRocm { ROCM_PATH = "${rocmPackages.clr}"; HIP_DEVICE_LIB_PATH = "${rocmPackages.rocm-device-libs}/amdgcn/bitcode"; };
# TODO(SomeoneSerge): It's better to add proper install targets at the CMake level, # if they haven't been added yet. postInstall = '' mkdir -p $out/include cp $src/include/llama.h $out/include/ '';
meta = { # Configurations we don't want even the CI to evaluate. Results in the # "unsupported platform" messages. This is mostly a no-op, because # cudaPackages would've refused to evaluate anyway. badPlatforms = optionals useCuda lib.platforms.darwin;
# Configurations that are known to result in build failures. Can be # overridden by importing Nixpkgs with `allowBroken = true`. broken = (useMetalKit && !effectiveStdenv.isDarwin);
description = "Inference of LLaMA model in pure C/C++${descriptionSuffix}"; homepage = "https://github.com/ggml-org/llama.cpp/"; license = lib.licenses.mit;
# Accommodates `nix run` and `lib.getExe` mainProgram = "llama-cli";
# These people might respond, on the best effort basis, if you ping them # in case of Nix-specific regressions or for reviewing Nix-specific PRs. # Consider adding yourself to this list if you want to ensure this flake # stays maintained and you're willing to invest your time. Do not add # other people without their consent. Consider removing people after # they've been unreachable for long periods of time.
# Note that lib.maintainers is defined in Nixpkgs, but you may just add # an attrset following the same format as in # https://github.com/NixOS/nixpkgs/blob/f36a80e54da29775c78d7eff0e628c2b4e34d1d7/maintainers/maintainer-list.nix maintainers = with lib.maintainers; [ philiptaron SomeoneSerge ];
# Extend `badPlatforms` instead platforms = lib.platforms.all; };})123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566{ lib, stdenv, buildPythonPackage, poetry-core, mkShell, python3Packages, gguf-py,}@inputs:
let llama-python-deps = with python3Packages; [ numpy sentencepiece transformers protobuf torchWithoutCuda gguf-py tqdm
# for scripts/compare-llama-bench.py gitpython tabulate
# for examples/pydantic-models-to-grammar-examples.py docstring-parser pydantic
];
llama-python-test-deps = with python3Packages; [ # Server bench matplotlib
# server tests openai pytest prometheus-client ];in
buildPythonPackage ({ pname = "llama-scripts"; version = "0.0.0"; pyproject = true;
# NOTE: The files filtered out here are not visible in the build sandbox, neither # do they affect the output hash. They can be modified without triggering a rebuild. src = lib.cleanSourceWith { filter = name: type: let any = builtins.any (x: x); baseName = builtins.baseNameOf name; in any [ (lib.hasSuffix ".py" name) (baseName == "README.md") (baseName == "pyproject.toml") ]; src = lib.cleanSource ../../.; }; nativeBuildInputs = [ poetry-core ]; nativeCheckInputs = llama-python-test-deps; dependencies = llama-python-deps;})1234567891011121314151617181920212223242526272829303132333435{ lib, newScope, python3, llamaVersion ? "0.0.0",}:
let pythonPackages = python3.pkgs;in
# We're using `makeScope` instead of just writing out an attrset# because it allows users to apply overlays later using `overrideScope'`.# Cf. https://noogle.dev/f/lib/makeScope
lib.makeScope newScope (self: { inherit llamaVersion; gguf-py = self.callPackage ./package-gguf-py.nix { inherit (pythonPackages) numpy tqdm sentencepiece pyyaml pytestCheckHook requests buildPythonPackage poetry-core ; }; python-scripts = self.callPackage ./python-scripts.nix { inherit (pythonPackages) buildPythonPackage poetry-core; }; llama-cpp = self.callPackage ./package.nix { }; docker = self.callPackage ./docker.nix { }; docker-min = self.callPackage ./docker.nix { interactive = false; }; sif = self.callPackage ./sif.nix { };})123456789101112131415161718192021222324252627{ lib, singularity-tools, llama-cpp, bashInteractive, interactive ? false,}:
let optionalInt = cond: x: if cond then x else 0;insingularity-tools.buildImage rec { inherit (llama-cpp) name; contents = [ llama-cpp ] ++ lib.optionals interactive [ bashInteractive ];
# These are excessive (but safe) for most variants. Building singularity # images requires superuser privileges, so we build them inside a VM in a # writable image of pre-determined size. # # ROCm is currently affected by https://github.com/NixOS/nixpkgs/issues/276846 # # Expected image sizes: # - cpu/blas: 150M, # - cuda, all gencodes: 560M, diskSize = 4096 + optionalInt llama-cpp.useRocm 16384; memSize = diskSize;}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113ARG UBUNTU_VERSION=24.04
# This needs to generally match the container host's environment.ARG ROCM_VERSION=7.2ARG AMDGPU_VERSION=7.2
# Target the ROCm build imageARG BASE_ROCM_DEV_CONTAINER=rocm/dev-ubuntu-${UBUNTU_VERSION}:${ROCM_VERSION}-complete
### Build imageFROM ${BASE_ROCM_DEV_CONTAINER} AS build
# Unless otherwise specified, we make a fat build.# This is mostly tied to rocBLAS supported archs.# check https://rocm.docs.amd.com/projects/install-on-linux/en/docs-7.2.0/reference/system-requirements.html# check https://rocm.docs.amd.com/projects/radeon-ryzen/en/latest/docs/compatibility/compatibilityrad/native_linux/native_linux_compatibility.html# check https://rocm.docs.amd.com/projects/radeon-ryzen/en/latest/docs/compatibility/compatibilityryz/native_linux/native_linux_compatibility.html
ARG ROCM_DOCKER_ARCH='gfx908;gfx90a;gfx942;gfx1030;gfx1100;gfx1101;gfx1151;gfx1150;gfx1200;gfx1201'
# Set ROCm architecturesENV AMDGPU_TARGETS=${ROCM_DOCKER_ARCH}
RUN apt-get update \ && apt-get install -y \ build-essential \ cmake \ git \ libssl-dev \ curl \ libgomp1
WORKDIR /app
COPY . .
RUN HIPCXX="$(hipconfig -l)/clang" HIP_PATH="$(hipconfig -R)" \ cmake -S . -B build \ -DGGML_HIP=ON \ -DGGML_HIP_ROCWMMA_FATTN=ON \ -DAMDGPU_TARGETS="$ROCM_DOCKER_ARCH" \ -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON \ -DCMAKE_BUILD_TYPE=Release -DLLAMA_BUILD_TESTS=OFF \ && cmake --build build --config Release -j$(nproc)
RUN mkdir -p /app/lib \ && find build -name "*.so*" -exec cp -P {} /app/lib \;
RUN mkdir -p /app/full \ && cp build/bin/* /app/full \ && cp *.py /app/full \ && cp -r gguf-py /app/full \ && cp -r requirements /app/full \ && cp requirements.txt /app/full \ && cp .devops/tools.sh /app/full/tools.sh
## Base imageFROM ${BASE_ROCM_DEV_CONTAINER} AS base
RUN apt-get update \ && apt-get install -y libgomp1 curl\ && apt autoremove -y \ && apt clean -y \ && rm -rf /tmp/* /var/tmp/* \ && find /var/cache/apt/archives /var/lib/apt/lists -not -name lock -type f -delete \ && find /var/cache -type f -delete
COPY --from=build /app/lib/ /app
### FullFROM base AS full
COPY --from=build /app/full /app
WORKDIR /app
RUN apt-get update \ && apt-get install -y \ git \ python3-pip \ python3 \ python3-wheel\ && pip install --break-system-packages --upgrade setuptools \ && pip install --break-system-packages -r requirements.txt \ && apt autoremove -y \ && apt clean -y \ && rm -rf /tmp/* /var/tmp/* \ && find /var/cache/apt/archives /var/lib/apt/lists -not -name lock -type f -delete \ && find /var/cache -type f -delete
ENTRYPOINT ["/app/tools.sh"]
### Light, CLI onlyFROM base AS light
COPY --from=build /app/full/llama-cli /app/full/llama-completion /app
WORKDIR /app
ENTRYPOINT [ "/app/llama-cli" ]
### Server, Server onlyFROM base AS server
ENV LLAMA_ARG_HOST=0.0.0.0
COPY --from=build /app/full/llama-server /app
WORKDIR /app
HEALTHCHECK CMD [ "curl", "-f", "http://localhost:8080/health" ]
ENTRYPOINT [ "/app/llama-server" ]123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126ARG GCC_VERSION=15.2.0ARG UBUNTU_VERSION=24.04
### Build Llama.cpp stageFROM gcc:${GCC_VERSION} AS build
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ --mount=type=cache,target=/var/lib/apt/lists,sharing=locked \ apt update -y && \ apt upgrade -y && \ apt install -y --no-install-recommends \ git cmake ccache ninja-build \ # WARNING: Do not use libopenblas-openmp-dev. libopenblas-dev is faster. libopenblas-dev libssl-dev && \ rm -rf /var/lib/apt/lists/*
WORKDIR /appCOPY . .
RUN --mount=type=cache,target=/root/.ccache \ --mount=type=cache,target=/app/build \ cmake -S . -B build -G Ninja \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_C_COMPILER_LAUNCHER=ccache \ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ -DLLAMA_BUILD_TESTS=OFF \ -DGGML_NATIVE=OFF \ -DGGML_BACKEND_DL=ON \ -DGGML_CPU_ALL_VARIANTS=ON \ -DGGML_BLAS=ON \ -DGGML_BLAS_VENDOR=OpenBLAS && \ cmake --build build --config Release -j $(nproc) && \ cmake --install build --prefix /opt/llama.cpp
COPY *.py /opt/llama.cpp/binCOPY .devops/tools.sh /opt/llama.cpp/bin
COPY gguf-py /opt/llama.cpp/gguf-pyCOPY requirements.txt /opt/llama.cpp/gguf-pyCOPY requirements /opt/llama.cpp/gguf-py/requirements
### Collect all llama.cpp binaries, libraries and distro librariesFROM scratch AS collector
# Copy llama.cpp binaries and librariesCOPY --from=build /opt/llama.cpp/bin /llama.cpp/binCOPY --from=build /opt/llama.cpp/lib /llama.cpp/libCOPY --from=build /opt/llama.cpp/gguf-py /llama.cpp/gguf-py
### Base imageFROM ubuntu:${UBUNTU_VERSION} AS base
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ --mount=type=cache,target=/var/lib/apt/lists,sharing=locked \ apt update -y && \ apt install -y --no-install-recommends \ # WARNING: Do not use libopenblas-openmp-dev. libopenblas-dev is faster. # See: https://github.com/ggml-org/llama.cpp/pull/15915#issuecomment-3317166506 curl libgomp1 libopenblas-dev && \ apt autoremove -y && \ apt clean -y && \ rm -rf /tmp/* /var/tmp/* && \ find /var/cache/apt/archives /var/lib/apt/lists -not -name lock -type f -delete && \ find /var/cache -type f -delete
# Copy llama.cpp librariesCOPY --from=collector /llama.cpp/lib /usr/lib/s390x-linux-gnu
### FullFROM base AS full
ENV PATH="/root/.cargo/bin:${PATH}"WORKDIR /app
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ --mount=type=cache,target=/var/lib/apt/lists,sharing=locked \ apt update -y && \ apt install -y \ git cmake libjpeg-dev \ python3 python3-pip python3-dev && \ apt autoremove -y && \ apt clean -y && \ rm -rf /tmp/* /var/tmp/* && \ find /var/cache/apt/archives /var/lib/apt/lists -not -name lock -type f -delete && \ find /var/cache -type f -delete
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
COPY --from=collector /llama.cpp/bin /appCOPY --from=collector /llama.cpp/gguf-py /app/gguf-py
RUN pip install --no-cache-dir --break-system-packages \ -r /app/gguf-py/requirements.txt
ENTRYPOINT [ "/app/tools.sh" ]
### CLI OnlyFROM base AS light
WORKDIR /llama.cpp/bin
# Copy llama.cpp binaries and librariesCOPY --from=collector /llama.cpp/bin/*.so /llama.cpp/binCOPY --from=collector /llama.cpp/bin/llama-cli /llama.cpp/bin/llama-completion /llama.cpp/bin
ENTRYPOINT [ "/llama.cpp/bin/llama-cli" ]
### ServerFROM base AS server
ENV LLAMA_ARG_HOST=0.0.0.0
WORKDIR /llama.cpp/bin
# Copy llama.cpp binaries and librariesCOPY --from=collector /llama.cpp/bin/*.so /llama.cpp/binCOPY --from=collector /llama.cpp/bin/llama-server /llama.cpp/bin
EXPOSE 8080
ENTRYPOINT [ "/llama.cpp/bin/llama-server" ]1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253#!/usr/bin/env bashset -e
# Read the first argument into a variablearg1="$1"
# Shift the arguments to remove the first oneshift
if [[ "$arg1" == '--convert' || "$arg1" == '-c' ]]; then exec python3 ./convert_hf_to_gguf.py "$@"elif [[ "$arg1" == '--quantize' || "$arg1" == '-q' ]]; then exec ./llama-quantize "$@"elif [[ "$arg1" == '--run' || "$arg1" == '-r' ]]; then exec ./llama-cli "$@"elif [[ "$arg1" == '--run-legacy' || "$arg1" == '-l' ]]; then exec ./llama-completion "$@"elif [[ "$arg1" == '--bench' || "$arg1" == '-b' ]]; then exec ./llama-bench "$@"elif [[ "$arg1" == '--perplexity' || "$arg1" == '-p' ]]; then exec ./llama-perplexity "$@"elif [[ "$arg1" == '--all-in-one' || "$arg1" == '-a' ]]; then echo "Converting PTH to GGML..." for i in $(ls $1/$2/ggml-model-f16.bin*); do if [ -f "${i/f16/q4_0}" ]; then echo "Skip model quantization, it already exists: ${i/f16/q4_0}" else echo "Converting PTH to GGML: $i into ${i/f16/q4_0}..." exec ./llama-quantize "$i" "${i/f16/q4_0}" q4_0 fi doneelif [[ "$arg1" == '--server' || "$arg1" == '-s' ]]; then exec ./llama-server "$@"else echo "Unknown command: $arg1" echo "Available commands: " echo " --run (-r): Run a model (chat) previously converted into ggml" echo " ex: -m /models/7B/ggml-model-q4_0.bin" echo " --run-legacy (-l): Run a model (legacy completion) previously converted into ggml" echo " ex: -m /models/7B/ggml-model-q4_0.bin -no-cnv -p \"Building a website can be done in 10 simple steps:\" -n 512" echo " --bench (-b): Benchmark the performance of the inference for various parameters." echo " ex: -m model.gguf" echo " --perplexity (-p): Measure the perplexity of a model over a given text." echo " ex: -m model.gguf -f file.txt" echo " --convert (-c): Convert a llama model into ggml" echo " ex: --outtype f16 \"/models/7B/\" " echo " --quantize (-q): Optimize with quantization process ggml" echo " ex: \"/models/7B/ggml-model-f16.bin\" \"/models/7B/ggml-model-q4_0.bin\" 2" echo " --all-in-one (-a): Execute --convert & --quantize" echo " ex: \"/models/\" 7B" echo " --server (-s): Run a model on the server" echo " ex: -m /models/7B/ggml-model-q4_0.bin -c 2048 -ngl 43 -mg 1 --port 8080"fi123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990ARG UBUNTU_VERSION=26.04
FROM ubuntu:$UBUNTU_VERSION AS build
# Install build toolsRUN apt update && apt install -y git build-essential cmake wget xz-utils
# Install SSL and Vulkan SDK dependenciesRUN apt install -y libssl-dev curl \ libxcb-xinput0 libxcb-xinerama0 libxcb-cursor-dev libvulkan-dev glslc
# Build itWORKDIR /app
COPY . .
RUN cmake -B build -DGGML_NATIVE=OFF -DGGML_VULKAN=ON -DLLAMA_BUILD_TESTS=OFF -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON && \ cmake --build build --config Release -j$(nproc)
RUN mkdir -p /app/lib && \ find build -name "*.so*" -exec cp -P {} /app/lib \;
RUN mkdir -p /app/full \ && cp build/bin/* /app/full \ && cp *.py /app/full \ && cp -r gguf-py /app/full \ && cp -r requirements /app/full \ && cp requirements.txt /app/full \ && cp .devops/tools.sh /app/full/tools.sh
## Base imageFROM ubuntu:$UBUNTU_VERSION AS base
RUN apt-get update \ && apt-get install -y libgomp1 curl libvulkan1 mesa-vulkan-drivers \ libglvnd0 libgl1 libglx0 libegl1 libgles2 \ && apt autoremove -y \ && apt clean -y \ && rm -rf /tmp/* /var/tmp/* \ && find /var/cache/apt/archives /var/lib/apt/lists -not -name lock -type f -delete \ && find /var/cache -type f -delete
COPY --from=build /app/lib/ /app
### FullFROM base AS full
COPY --from=build /app/full /app
WORKDIR /app
RUN apt-get update \ && apt-get install -y \ build-essential \ git \ python3 \ python3-dev \ python3-pip \ python3-wheel \ && pip install --break-system-packages --upgrade setuptools \ && pip install --break-system-packages -r requirements.txt \ && apt autoremove -y \ && apt clean -y \ && rm -rf /tmp/* /var/tmp/* \ && find /var/cache/apt/archives /var/lib/apt/lists -not -name lock -type f -delete \ && find /var/cache -type f -delete
ENTRYPOINT ["/app/tools.sh"]
### Light, CLI onlyFROM base AS light
COPY --from=build /app/full/llama-cli /app/full/llama-completion /app
WORKDIR /app
ENTRYPOINT [ "/app/llama-cli" ]
### Server, Server onlyFROM base AS server
ENV LLAMA_ARG_HOST=0.0.0.0
COPY --from=build /app/full/llama-server /app
WORKDIR /app
HEALTHCHECK CMD [ "curl", "-f", "http://localhost:8080/health" ]
ENTRYPOINT [ "/app/llama-server" ]1234567891011121314151617181920*.o*.a.cache/# Do not ignore .git directory, otherwise the reported build number will always be 0.github/.gitignore.vs/.vscode/.DS_Store
build*/
models/*
/llama-cli/llama-quantize
arm_neon.hcompile_commands.jsonDockerfile123456{ "Exclude": ["^\\.gitmodules$", "stb_image\\.h"], "Disable": { "IndentSize": true }}12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970# https://EditorConfig.org
# Top-most EditorConfig fileroot = true
# Unix-style newlines with a newline ending every file, utf-8 charset[*]end_of_line = lfinsert_final_newline = truetrim_trailing_whitespace = truecharset = utf-8indent_style = spaceindent_size = 4
[Makefile]indent_style = tab
[scripts/*.mk]indent_style = tab
[prompts/*.txt]insert_final_newline = unset
[tools/server/public/*]indent_size = 2
[tools/server/public/deps_*]trim_trailing_whitespace = unsetindent_style = unsetindent_size = unset
[tools/server/deps_*]trim_trailing_whitespace = unsetindent_style = unsetindent_size = unset
[examples/llama.swiftui/llama.swiftui.xcodeproj/*]indent_style = tab
[tools/cvector-generator/*.txt]trim_trailing_whitespace = unsetinsert_final_newline = unset
[models/templates/*.jinja]indent_style = unsetindent_size = unsetend_of_line = unsetcharset = unsettrim_trailing_whitespace = unsetinsert_final_newline = unset
[vendor/miniaudio/miniaudio.h]trim_trailing_whitespace = unsetinsert_final_newline = unset
[tools/server/webui/**]indent_style = unsetindent_size = unsetend_of_line = unsetcharset = unsettrim_trailing_whitespace = unsetinsert_final_newline = unset
[benches/**]indent_style = unsetindent_size = unsetend_of_line = unsetcharset = unsettrim_trailing_whitespace = unsetinsert_final_newline = unset123456789101112131415161718[flake8]max-line-length = 125ignore = E203,E211,E221,E225,E231,E241,E251,E261,E266,E501,E701,E704,W503exclude = # Do not traverse examples and tools examples, tools, # Do not include package initializers __init__.py, # No need to traverse our git directory .git, # There's no value in checking cache directories __pycache__, # No need to include the build path build, # This contains builds that we don't want to check dist # This is generated with `python build .` for package releases# max-complexity = 101{ "contextFileName": "AGENTS.md" }12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788name: Bug (compilation)description: Something goes wrong when trying to compile llama.cpp.title: "Compile bug: "labels: ["bug-unconfirmed", "compilation"]body: - type: markdown attributes: value: > Thanks for taking the time to fill out this bug report! This issue template is intended for bug reports where the compilation of llama.cpp fails. Before opening an issue, please confirm that the compilation still fails after recreating the CMake build directory and with `-DGGML_CCACHE=OFF`. If the compilation succeeds with ccache disabled you should be able to permanently fix the issue by clearing `~/.cache/ccache` (on Linux). - type: textarea id: commit attributes: label: Git commit description: Which commit are you trying to compile? placeholder: | $git rev-parse HEAD 84a07a17b1b08cf2b9747c633a2372782848a27f validations: required: true - type: dropdown id: operating-system attributes: label: Operating systems description: Which operating systems do you know to be affected? multiple: true options: - Linux - Mac - Windows - BSD - Other? (Please let us know in description) validations: required: true - type: dropdown id: backends attributes: label: GGML backends description: Which GGML backends do you know to be affected? options: [AMX, BLAS, CANN, CPU, CUDA, Hexagon, HIP, Metal, Musa, OpenCL, RPC, SYCL, VirtGPU, Vulkan, WebGPU, zDNN, ZenDNN] multiple: true validations: required: true - type: textarea id: info attributes: label: Problem description & steps to reproduce description: > Please give us a summary of the problem and tell us how to reproduce it. If you can narrow down the bug to specific compile flags, that information would be very much appreciated by us. placeholder: > I'm trying to compile llama.cpp with CUDA support on a fresh install of Ubuntu and get error XY. Here are the exact commands that I used: ... validations: required: true - type: textarea id: first_bad_commit attributes: label: First Bad Commit description: > If the bug was not present on an earlier version: when did it start appearing? If possible, please do a git bisect and identify the exact commit that introduced the bug. validations: required: false - type: textarea id: command attributes: label: Compile command description: > Please provide the exact command you used to compile llama.cpp. For example: `cmake -B ...`. This will be automatically formatted into code, so no need for backticks. render: shell validations: required: true - type: textarea id: logs attributes: label: Relevant log output description: > Please copy and paste any relevant log output, including any generated text. This will be automatically formatted into code, so no need for backticks. render: shell validations: required: true123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115name: Bug (model use)description: Something goes wrong when using a model (in general, not specific to a single llama.cpp module).title: "Eval bug: "labels: ["bug-unconfirmed", "model evaluation"]body: - type: markdown attributes: value: > Thanks for taking the time to fill out this bug report! This issue template is intended for bug reports where the model evaluation results (i.e. the generated text) are incorrect or llama.cpp crashes during model evaluation. If you encountered the issue while using an external UI (e.g. ollama), please reproduce your issue using one of the examples/binaries in this repository. The `llama-completion` binary can be used for simple and reproducible model inference. - type: textarea id: version attributes: label: Name and Version description: Which version of our software are you running? (use `--version` to get a version string) placeholder: | $./llama-cli --version version: 2999 (42b4109e) built with cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 for x86_64-linux-gnu validations: required: true - type: dropdown id: operating-system attributes: label: Operating systems description: Which operating systems do you know to be affected? multiple: true options: - Linux - Mac - Windows - BSD - Other? (Please let us know in description) validations: required: true - type: dropdown id: backends attributes: label: GGML backends description: Which GGML backends do you know to be affected? options: [AMX, BLAS, CANN, CPU, CUDA, Hexagon, HIP, Metal, Musa, OpenCL, RPC, SYCL, VirtGPU, Vulkan, WebGPU, zDNN, ZenDNN] multiple: true validations: required: true - type: textarea id: hardware attributes: label: Hardware description: Which CPUs/GPUs are you using? placeholder: > e.g. Ryzen 5950X + 2x RTX 4090 validations: required: true - type: textarea id: model attributes: label: Models description: > Which model(s) at which quantization were you using when encountering the bug? If you downloaded a GGUF file off of Huggingface, please provide a link. placeholder: > e.g. Meta LLaMA 3.1 Instruct 8b q4_K_M validations: required: false - type: textarea id: info attributes: label: Problem description & steps to reproduce description: > Please give us a summary of the problem and tell us how to reproduce it. If you can narrow down the bug to specific hardware, compile flags, or command line arguments, that information would be very much appreciated by us.
If possible, please try to reproduce the issue using `llama-completion` with `-fit off`. If you can only reproduce the issue with `-fit on`, please provide logs both with and without `--verbose`. placeholder: > e.g. when I run llama-completion with `-fa on` I get garbled outputs for very long prompts. With short prompts or `-fa off` it works correctly. Here are the exact commands that I used: ... validations: required: true - type: textarea id: first_bad_commit attributes: label: First Bad Commit description: > If the bug was not present on an earlier version: when did it start appearing? If possible, please do a git bisect and identify the exact commit that introduced the bug. validations: required: false - type: textarea id: logs attributes: label: Relevant log output description: > Please copy and paste any relevant log output, including the command that you entered and any generated text. For very long logs (thousands of lines), preferably upload them as files instead. On Linux you can redirect console output into a file by appending ` > llama.log 2>&1` to your command. value: | <details> <summary>Logs</summary> <!-- Copy-pasted short logs go into the "console" area here -->
```console
``` </details>
<!-- Long logs that you upload as files go here, outside the "console" area --> validations: required: true123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103name: Bug (misc.)description: Something is not working the way it should (and it's not covered by any of the above cases).title: "Misc. bug: "labels: ["bug-unconfirmed"]body: - type: markdown attributes: value: > Thanks for taking the time to fill out this bug report! This issue template is intended for miscellaneous bugs that don't fit into any other category. If you encountered the issue while using an external UI (e.g. ollama), please reproduce your issue using one of the examples/binaries in this repository. - type: textarea id: version attributes: label: Name and Version description: Which version of our software is affected? (You can use `--version` to get a version string.) placeholder: | $./llama-cli --version version: 2999 (42b4109e) built with cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 for x86_64-linux-gnu validations: required: true - type: dropdown id: operating-system attributes: label: Operating systems description: Which operating systems do you know to be affected? multiple: true options: - Linux - Mac - Windows - BSD - Other? (Please let us know in description) validations: required: false - type: dropdown id: module attributes: label: Which llama.cpp modules do you know to be affected? multiple: true options: - Documentation/Github - libllama (core library) - llama-cli - llama-server - llama-bench - llama-quantize - Python/Bash scripts - Test code - Other (Please specify in the next section) validations: required: false - type: textarea id: command attributes: label: Command line description: > Please provide the exact commands you entered, if applicable. For example: `llama-server -m ... -c ...`, `llama-cli -m ...`, etc. This will be automatically formatted into code, so no need for backticks. render: shell validations: required: false - type: textarea id: info attributes: label: Problem description & steps to reproduce description: > Please give us a summary of the problem and tell us how to reproduce it (if applicable). validations: required: true - type: textarea id: first_bad_commit attributes: label: First Bad Commit description: > If the bug was not present on an earlier version and it's not trivial to track down: when did it start appearing? If possible, please do a git bisect and identify the exact commit that introduced the bug. validations: required: false - type: textarea id: logs attributes: label: Relevant log output description: > If applicable, please copy and paste any relevant log output, including any generated text. If you are encountering problems specifically with the `llama_params_fit` module, always upload `--verbose` logs as well. For very long logs (thousands of lines), please upload them as files instead. On Linux you can redirect console output into a file by appending ` > llama.log 2>&1` to your command. value: | <details> <summary>Logs</summary> <!-- Copy-pasted short logs go into the "console" area here -->
```console
``` </details>
<!-- Long logs that you upload as files go here, outside the "console" area --> validations: required: false123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051name: Enhancementdescription: Used to request enhancements for llama.cpp.title: "Feature Request: "labels: ["enhancement"]body: - type: markdown attributes: value: | [Please post your idea first in Discussion if there is not yet a consensus for this enhancement request. This will help to keep this issue tracker focused on enhancements that the community has agreed needs to be implemented.](https://github.com/ggml-org/llama.cpp/discussions/categories/ideas)
- type: checkboxes id: prerequisites attributes: label: Prerequisites description: Please confirm the following before submitting your enhancement request. options: - label: I am running the latest code. Mention the version if possible as well. required: true - label: I carefully followed the [README.md](https://github.com/ggml-org/llama.cpp/blob/master/README.md). required: true - label: I searched using keywords relevant to my issue to make sure that I am creating a new issue that is not already open (or closed). required: true - label: I reviewed the [Discussions](https://github.com/ggml-org/llama.cpp/discussions), and have a new and useful enhancement to share. required: true
- type: textarea id: feature-description attributes: label: Feature Description description: Please provide a detailed written description of what you were trying to do, and what you expected `llama.cpp` to do as an enhancement. placeholder: Detailed description of the enhancement validations: required: true
- type: textarea id: motivation attributes: label: Motivation description: Please provide a detailed written description of reasons why this feature is necessary and how it is useful to `llama.cpp` users. placeholder: Explanation of why this feature is needed and its benefits validations: required: true
- type: textarea id: possible-implementation attributes: label: Possible Implementation description: If you have an idea as to how it can be implemented, please write a detailed description. Feel free to give links to external sources or share visuals that might be helpful to understand the details better. placeholder: Detailed description of potential implementation validations: required: false12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152name: Researchdescription: Track new technical research area.title: "Research: "labels: ["research 🔬"]body: - type: markdown attributes: value: | Don't forget to check for any [duplicate research issue tickets](https://github.com/ggml-org/llama.cpp/issues?q=is%3Aopen+is%3Aissue+label%3A%22research+%F0%9F%94%AC%22)
- type: checkboxes id: research-stage attributes: label: Research Stage description: Track general state of this research ticket options: - label: Background Research (Let's try to avoid reinventing the wheel) - label: Hypothesis Formed (How do you think this will work and it's effect?) - label: Strategy / Implementation Forming - label: Analysis of results - label: Debrief / Documentation (So people in the future can learn from us)
- type: textarea id: background attributes: label: Previous existing literature and research description: Whats the current state of the art and whats the motivation for this research?
- type: textarea id: hypothesis attributes: label: Hypothesis description: How do you think this will work and it's effect?
- type: textarea id: implementation attributes: label: Implementation description: Got an approach? e.g. a PR ready to go?
- type: textarea id: analysis attributes: label: Analysis description: How does the proposed implementation behave?
- type: textarea id: logs attributes: label: Relevant log output description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. render: shell12345678910111213141516171819202122232425262728name: Refactor (Maintainers)description: Used to track refactoring opportunities.title: "Refactor: "labels: ["refactor"]body: - type: markdown attributes: value: | Don't forget to [check for existing refactor issue tickets](https://github.com/ggml-org/llama.cpp/issues?q=is%3Aopen+is%3Aissue+label%3Arefactoring) in case it's already covered. Also you may want to check [Pull request refactor label as well](https://github.com/ggml-org/llama.cpp/pulls?q=is%3Aopen+is%3Apr+label%3Arefactoring) for duplicates too.
- type: textarea id: background-description attributes: label: Background Description description: Please provide a detailed written description of the pain points you are trying to solve. placeholder: Detailed description behind your motivation to request refactor validations: required: true
- type: textarea id: possible-approaches attributes: label: Possible Refactor Approaches description: If you have some idea of possible approaches to solve this problem. You may want to make it a todo list. placeholder: Your idea of possible refactoring opportunity/approaches validations: required: false1234567891011blank_issues_enabled: truecontact_links: - name: Got an idea? url: https://github.com/ggml-org/llama.cpp/discussions/categories/ideas about: Pop it there. It may then become an enhancement ticket. - name: Got a question? url: https://github.com/ggml-org/llama.cpp/discussions/categories/q-a about: Ask a question there! - name: Want to contribute? url: https://github.com/ggml-org/llama.cpp/wiki/contribute about: Head to the contribution guide page of the wiki for areas you can help with12345678910111213141516171819202122name: "Determine tag name"description: "Determine the tag name to use for a release"outputs: name: description: "The name of the tag" value: ${{ steps.tag.outputs.name }}
runs: using: "composite" steps: - name: Determine tag name id: tag shell: bash run: | BUILD_NUMBER="$(git rev-list --count HEAD)" SHORT_HASH="$(git rev-parse --short=7 HEAD)" if [[ "${{ env.BRANCH_NAME }}" == "master" ]]; then echo "name=b${BUILD_NUMBER}" >> $GITHUB_OUTPUT else SAFE_NAME=$(echo "${{ env.BRANCH_NAME }}" | tr '/' '-') echo "name=${SAFE_NAME}-b${BUILD_NUMBER}-${SHORT_HASH}" >> $GITHUB_OUTPUT fi123456789101112131415161718192021222324252627282930313233343536name: "Install exe"description: "Download and install exe"inputs: url: description: "URL of the exe installer" required: true args: description: "Installer arguments" required: true timeout: description: "Timeout (in ms)" required: false default: "600000"
runs: using: "composite" steps: - name: Install EXE shell: pwsh run: | $ErrorActionPreference = "Stop" write-host "Downloading Installer EXE" Invoke-WebRequest -Uri "${{ inputs.url }}" -OutFile "${env:RUNNER_TEMP}\temp-install.exe" write-host "Installing" $proc = Start-Process "${env:RUNNER_TEMP}\temp-install.exe" -ArgumentList '${{ inputs.args }}' -NoNewWindow -PassThru $completed = $proc.WaitForExit(${{ inputs.timeout }}) if (-not $completed) { Write-Error "Installer timed out. Killing the process" $proc.Kill() exit 1 } if ($proc.ExitCode -ne 0) { Write-Error "Installer failed with exit code $($proc.ExitCode)" exit 1 } write-host "Completed installation"1234567891011121314151617181920name: "Linux - Setup SpacemiT Toolchain"description: "Setup SpacemiT Toolchain for Linux"inputs: path: description: "Installation path" required: true version: description: "SpacemiT toolchain version" required: true
runs: using: "composite" steps: - name: Setup SpacemiT Toolchain id: setup uses: ./.github/actions/unarchive-tar with: url: https://archive.spacemit.com/toolchain/spacemit-toolchain-linux-glibc-x86_64-v${{ inputs.version }}.tar.xz path: ${{ inputs.path }} strip: 11234567891011121314151617181920name: "Linux - Setup Vulkan SDK"description: "Setup Vulkan SDK for Linux"inputs: path: description: "Installation path" required: true version: description: "Vulkan SDK version" required: true
runs: using: "composite" steps: - name: Setup Vulkan SDK id: setup uses: ./.github/actions/unarchive-tar with: url: https://sdk.lunarg.com/sdk/download/${{ inputs.version }}/linux/vulkan_sdk.tar.xz path: ${{ inputs.path }} strip: 1123456789101112131415161718192021222324252627name: "Unarchive tar"description: "Download and unarchive tar into directory"inputs: url: description: "URL of the tar archive" required: true path: description: "Directory to unarchive into" required: true type: description: "Compression type (tar option)" required: false default: "J" strip: description: "Strip components" required: false default: "0"
runs: using: "composite" steps: - name: Unarchive into directory shell: bash run: | mkdir -p ${{ inputs.path }} cd ${{ inputs.path }} curl --no-progress-meter ${{ inputs.url }} | tar -${{ inputs.type }}x --strip-components=${{ inputs.strip }}1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798name: "Windows - Setup CUDA Toolkit"description: "Setup CUDA Toolkit for Windows"inputs: cuda_version: description: "CUDA toolkit version" required: true
runs: using: "composite" steps: - name: Install Cuda Toolkit 11.7 if: ${{ inputs.cuda_version == '11.7' }} shell: pwsh run: | mkdir -p "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7" choco install unzip -y curl -O "https://developer.download.nvidia.com/compute/cuda/redist/cuda_cudart/windows-x86_64/cuda_cudart-windows-x86_64-11.7.99-archive.zip" curl -O "https://developer.download.nvidia.com/compute/cuda/redist/cuda_nvcc/windows-x86_64/cuda_nvcc-windows-x86_64-11.7.99-archive.zip" curl -O "https://developer.download.nvidia.com/compute/cuda/redist/cuda_nvrtc/windows-x86_64/cuda_nvrtc-windows-x86_64-11.7.99-archive.zip" curl -O "https://developer.download.nvidia.com/compute/cuda/redist/libcublas/windows-x86_64/libcublas-windows-x86_64-11.7.4.6-archive.zip" curl -O "https://developer.download.nvidia.com/compute/cuda/redist/cuda_nvtx/windows-x86_64/cuda_nvtx-windows-x86_64-11.7.91-archive.zip" curl -O "https://developer.download.nvidia.com/compute/cuda/redist/visual_studio_integration/windows-x86_64/visual_studio_integration-windows-x86_64-11.7.91-archive.zip" curl -O "https://developer.download.nvidia.com/compute/cuda/redist/cuda_nvprof/windows-x86_64/cuda_nvprof-windows-x86_64-11.7.101-archive.zip" curl -O "https://developer.download.nvidia.com/compute/cuda/redist/cuda_cccl/windows-x86_64/cuda_cccl-windows-x86_64-11.7.91-archive.zip" unzip '*.zip' -d "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7" xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\cuda_cudart-windows-x86_64-11.7.99-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7" /E /I /H /Y xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\cuda_nvcc-windows-x86_64-11.7.99-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7" /E /I /H /Y xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\cuda_nvrtc-windows-x86_64-11.7.99-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7" /E /I /H /Y xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\libcublas-windows-x86_64-11.7.4.6-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7" /E /I /H /Y xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\cuda_nvtx-windows-x86_64-11.7.91-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7" /E /I /H /Y xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\visual_studio_integration-windows-x86_64-11.7.91-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7" /E /I /H /Y xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\cuda_nvprof-windows-x86_64-11.7.101-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7" /E /I /H /Y xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\cuda_cccl-windows-x86_64-11.7.91-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7" /E /I /H /Y echo "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append echo "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\libnvvp" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append echo "CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8 echo "CUDA_PATH_V11_7=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
- name: Install Cuda Toolkit 12.4 if: ${{ inputs.cuda_version == '12.4' }} shell: pwsh run: | mkdir -p "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4" choco install unzip -y curl -O "https://developer.download.nvidia.com/compute/cuda/redist/cuda_cudart/windows-x86_64/cuda_cudart-windows-x86_64-12.4.127-archive.zip" curl -O "https://developer.download.nvidia.com/compute/cuda/redist/cuda_nvcc/windows-x86_64/cuda_nvcc-windows-x86_64-12.4.131-archive.zip" curl -O "https://developer.download.nvidia.com/compute/cuda/redist/cuda_nvrtc/windows-x86_64/cuda_nvrtc-windows-x86_64-12.4.127-archive.zip" curl -O "https://developer.download.nvidia.com/compute/cuda/redist/libcublas/windows-x86_64/libcublas-windows-x86_64-12.4.5.8-archive.zip" curl -O "https://developer.download.nvidia.com/compute/cuda/redist/cuda_nvtx/windows-x86_64/cuda_nvtx-windows-x86_64-12.4.127-archive.zip" curl -O "https://developer.download.nvidia.com/compute/cuda/redist/cuda_profiler_api/windows-x86_64/cuda_profiler_api-windows-x86_64-12.4.127-archive.zip" curl -O "https://developer.download.nvidia.com/compute/cuda/redist/visual_studio_integration/windows-x86_64/visual_studio_integration-windows-x86_64-12.4.127-archive.zip" curl -O "https://developer.download.nvidia.com/compute/cuda/redist/cuda_nvprof/windows-x86_64/cuda_nvprof-windows-x86_64-12.4.127-archive.zip" curl -O "https://developer.download.nvidia.com/compute/cuda/redist/cuda_cccl/windows-x86_64/cuda_cccl-windows-x86_64-12.4.127-archive.zip" unzip '*.zip' -d "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4" xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\cuda_cudart-windows-x86_64-12.4.127-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4" /E /I /H /Y xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\cuda_nvcc-windows-x86_64-12.4.131-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4" /E /I /H /Y xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\cuda_nvrtc-windows-x86_64-12.4.127-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4" /E /I /H /Y xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\libcublas-windows-x86_64-12.4.5.8-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4" /E /I /H /Y xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\cuda_nvtx-windows-x86_64-12.4.127-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4" /E /I /H /Y xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\cuda_profiler_api-windows-x86_64-12.4.127-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4" /E /I /H /Y xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\visual_studio_integration-windows-x86_64-12.4.127-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4" /E /I /H /Y xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\cuda_nvprof-windows-x86_64-12.4.127-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4" /E /I /H /Y xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\cuda_cccl-windows-x86_64-12.4.127-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4" /E /I /H /Y echo "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append echo "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\libnvvp" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append echo "CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8 echo "CUDA_PATH_V12_4=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
- name: Install Cuda Toolkit 13.1 if: ${{ inputs.cuda_version == '13.1' }} shell: pwsh run: | mkdir -p "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.1" choco install unzip -y curl -O "https://developer.download.nvidia.com/compute/cuda/redist/cuda_crt/windows-x86_64/cuda_crt-windows-x86_64-13.1.80-archive.zip" curl -O "https://developer.download.nvidia.com/compute/cuda/redist/cuda_cudart/windows-x86_64/cuda_cudart-windows-x86_64-13.1.80-archive.zip" curl -O "https://developer.download.nvidia.com/compute/cuda/redist/cuda_nvcc/windows-x86_64/cuda_nvcc-windows-x86_64-13.1.80-archive.zip" curl -O "https://developer.download.nvidia.com/compute/cuda/redist/cuda_nvrtc/windows-x86_64/cuda_nvrtc-windows-x86_64-13.1.80-archive.zip" curl -O "https://developer.download.nvidia.com/compute/cuda/redist/libcublas/windows-x86_64/libcublas-windows-x86_64-13.2.0.9-archive.zip" curl -O "https://developer.download.nvidia.com/compute/cuda/redist/libnvvm/windows-x86_64/libnvvm-windows-x86_64-13.1.80-archive.zip" curl -O "https://developer.download.nvidia.com/compute/cuda/redist/cuda_nvtx/windows-x86_64/cuda_nvtx-windows-x86_64-13.1.68-archive.zip" curl -O "https://developer.download.nvidia.com/compute/cuda/redist/cuda_profiler_api/windows-x86_64/cuda_profiler_api-windows-x86_64-13.1.80-archive.zip" curl -O "https://developer.download.nvidia.com/compute/cuda/redist/visual_studio_integration/windows-x86_64/visual_studio_integration-windows-x86_64-13.1.68-archive.zip" curl -O "https://developer.download.nvidia.com/compute/cuda/redist/cuda_cccl/windows-x86_64/cuda_cccl-windows-x86_64-13.1.78-archive.zip" unzip '*.zip' -d "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.1" xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.1\cuda_crt-windows-x86_64-13.1.80-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.1" /E /I /H /Y xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.1\cuda_cudart-windows-x86_64-13.1.80-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.1" /E /I /H /Y xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.1\cuda_nvcc-windows-x86_64-13.1.80-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.1" /E /I /H /Y xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.1\cuda_nvrtc-windows-x86_64-13.1.80-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.1" /E /I /H /Y xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.1\libcublas-windows-x86_64-13.2.0.9-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.1" /E /I /H /Y xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.1\libnvvm-windows-x86_64-13.1.80-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.1" /E /I /H /Y xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.1\cuda_nvtx-windows-x86_64-13.1.68-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.1" /E /I /H /Y xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.1\cuda_profiler_api-windows-x86_64-13.1.80-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.1" /E /I /H /Y xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.1\visual_studio_integration-windows-x86_64-13.1.68-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.1" /E /I /H /Y xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.1\cuda_cccl-windows-x86_64-13.1.78-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.1" /E /I /H /Y echo "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.1\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append echo "CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.1" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8 echo "CUDA_PATH_V13_1=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.1" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8123456789101112131415name: "Windows - Setup ROCm"description: "Setup ROCm for Windows"inputs: version: description: "ROCm version" required: true
runs: using: "composite" steps: - name: Setup ROCm uses: ./.github/actions/install-exe with: url: https://download.amd.com/developer/eula/rocm-hub/AMD-Software-PRO-Edition-${{ inputs.version }}-Win11-For-HIP.exe args: -install123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106# https://github.com/actions/labelerApple Metal: - changed-files: - any-glob-to-any-file: - ggml/include/ggml-metal.h - ggml/src/ggml-metal/** - README-metal.mdSYCL: - changed-files: - any-glob-to-any-file: - ggml/include/ggml-sycl.h - ggml/src/ggml-sycl/** - docs/backend/SYCL.md - examples/sycl/**Nvidia GPU: - changed-files: - any-glob-to-any-file: - ggml/include/ggml-cuda.h - ggml/src/ggml-cuda/**Vulkan: - changed-files: - any-glob-to-any-file: - ggml/include/ggml-vulkan.h - ggml/src/ggml-vulkan/**IBM zDNN: - changed-files: - any-glob-to-any-file: - ggml/include/ggml-zdnn.h - ggml/src/ggml-zdnn/**documentation: - changed-files: - any-glob-to-any-file: - docs/** - media/**testing: - changed-files: - any-glob-to-any-file: - tests/**build: - changed-files: - any-glob-to-any-file: - cmake/** - CMakeLists.txt - CMakePresets.jsonexamples: - changed-files: - any-glob-to-any-file: - examples/** - tools/**devops: - changed-files: - any-glob-to-any-file: - .devops/** - .github/** - ci/**python: - changed-files: - any-glob-to-any-file: - "**/*.py" - requirements/** - gguf-py/** - .flake8script: - changed-files: - any-glob-to-any-file: - scripts/**android: - changed-files: - any-glob-to-any-file: - examples/llama.android/**server: - changed-files: - any-glob-to-any-file: - tools/server/**ggml: - changed-files: - any-glob-to-any-file: - ggml/**model: - changed-files: - any-glob-to-any-file: - src/models/**nix: - changed-files: - any-glob-to-any-file: - "**/*.nix" - .github/workflows/nix-*.yml - .devops/nix/nixpkgs-instances.nixembedding: - changed-files: - any-glob-to-any-file: examples/embedding/jinja parser: - changed-files: - any-glob-to-any-file: - common/jinja/**Ascend NPU: - changed-files: - any-glob-to-any-file: - ggml/include/ggml-cann.h - ggml/src/ggml-cann/** - docs/backend/CANN.mdOpenCL: - changed-files: - any-glob-to-any-file: - ggml/include/ggml-opencl.h - ggml/src/ggml-opencl/**1*Make sure to read the [contributing guidelines](https://github.com/ggml-org/llama.cpp/blob/master/CONTRIBUTING.md) before submitting a PR*.gitattributes+35
qwen25/qwen25_7b__fft__base__unmasked/TRAINING_TAGS.jsonAdded+17
qwen25/qwen25_7b__fft__base__unmasked/awq/quantize_awq.pyAdded+12
qwen25/qwen25_7b__fft__base__unmasked/gguf/convert_to_gguf.shAdded+9
qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.clang-formatAdded+171
qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.clang-tidyAdded+28
qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.devops/cann.DockerfileAdded+130
qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.devops/cpu.DockerfileAdded+88
qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.devops/cuda-new.DockerfileAdded+95
qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.devops/cuda.DockerfileAdded+94
qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.devops/intel.DockerfileAdded+95
qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.devops/llama-cli-cann.DockerfileAdded+45
qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.devops/llama-cpp-cuda.srpm.specAdded+85
qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.devops/llama-cpp.srpm.specAdded+87
qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.devops/musa.DockerfileAdded+101
qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.devops/nix/apps.nixAdded+21
qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.devops/nix/devshells.nixAdded+52
qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.devops/nix/docker.nixAdded+37
qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.devops/nix/jetson-support.nixAdded+39
qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.devops/nix/nixpkgs-instances.nixAdded+45
qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.devops/nix/package-gguf-py.nixAdded+38
qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.devops/nix/package.nixAdded+243
qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.devops/nix/python-scripts.nixAdded+66
qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.devops/nix/scope.nixAdded+35
qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.devops/nix/sif.nixAdded+27
qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.devops/rocm.DockerfileAdded+113
qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.devops/s390x.DockerfileAdded+126
qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.devops/tools.shAdded+53
qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.devops/vulkan.DockerfileAdded+90
qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.dockerignoreAdded+20
qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.ecrcAdded+6
qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.editorconfigAdded+70
qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.flake8Added+18
qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.gemini/settings.jsonAdded+1
qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.github/ISSUE_TEMPLATE/010-bug-compilation.ymlAdded+88
qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.github/ISSUE_TEMPLATE/011-bug-results.ymlAdded+115
qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.github/ISSUE_TEMPLATE/019-bug-misc.ymlAdded+103
qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.github/ISSUE_TEMPLATE/020-enhancement.ymlAdded+51
qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.github/ISSUE_TEMPLATE/030-research.ymlAdded+52
qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.github/ISSUE_TEMPLATE/040-refactor.ymlAdded+28
qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.github/ISSUE_TEMPLATE/config.ymlAdded+11
qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.github/actions/get-tag-name/action.ymlAdded+22
qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.github/actions/install-exe/action.ymlAdded+36
qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.github/actions/linux-setup-spacemit/action.ymlAdded+20
qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.github/actions/linux-setup-vulkan/action.ymlAdded+20
qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.github/actions/unarchive-tar/action.ymlAdded+27
qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.github/actions/windows-setup-cuda/action.ymlAdded+98
qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.github/actions/windows-setup-rocm/action.ymlAdded+15
qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.github/labeler.ymlAdded+106
qwen25/qwen25_7b__fft__base__unmasked/gguf/llama.cpp/.github/pull_request_template.mdAdded+1