Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
e750735
first commit
antimatter15 Mar 16, 2023
6d973a6
Fix CMake
anzz1 Mar 16, 2023
c8917ca
Fix Windows CI and autorelease
anzz1 Mar 16, 2023
0660aee
process the scanf() output so Ubuntu 22 compiler doesn't error due to…
bigattichouse Mar 16, 2023
bf24462
Merge pull request #5 from anzz1/master
antimatter15 Mar 17, 2023
2af2331
Merge pull request #3 from bigattichouse/master
antimatter15 Mar 17, 2023
72f9fbe
Fix #2
antimatter15 Mar 17, 2023
235a411
Update build.yml
antimatter15 Mar 17, 2023
f2eda96
Fix Makefile
anzz1 Mar 17, 2023
8a3d6f2
CI: Enable Linux/MacOS builds
anzz1 Mar 17, 2023
376a4a2
Merge branch 'master' into ci_test
anzz1 Mar 17, 2023
5be098f
Compute remaining tokens along the way and exit if over
jxy Mar 17, 2023
af02c94
add easy Windows install instructions to the readme
mcmonkey4eva Mar 17, 2023
197df5f
Merge pull request #18 from jxy/limit_tokens
antimatter15 Mar 17, 2023
71d0978
Merge pull request #12 from anzz1/ci_test
antimatter15 Mar 17, 2023
1e82fa8
Merge pull request #26 from mcmonkey4eva/master
antimatter15 Mar 17, 2023
e7bdee6
CI fine tuning
anzz1 Mar 17, 2023
d0f855a
Update README.md
antimatter15 Mar 17, 2023
7cd84a7
Update README.md
antimatter15 Mar 18, 2023
97d327e
Update chat.cpp
antimatter15 Mar 18, 2023
96e0519
extending context window
antimatter15 Mar 18, 2023
7b24407
Merge pull request #31 from anzz1/ci_test
antimatter15 Mar 18, 2023
e95e64b
Implement non-greedy tokenizer that tries to maximize token lengths (…
thement Mar 17, 2023
1cb9215
removing random prompt generation
antimatter15 Mar 18, 2023
501a8e1
adding to credit section
antimatter15 Mar 18, 2023
7e12661
ci releases for mac and linux
antimatter15 Mar 18, 2023
1c62e35
create release
antimatter15 Mar 18, 2023
3f7d187
more copying stuff
antimatter15 Mar 18, 2023
564b861
archiving artifacts
antimatter15 Mar 18, 2023
ddc4e24
maybe macos-arm64 is case sensitive
antimatter15 Mar 18, 2023
4a524c5
commenting out aarch
antimatter15 Mar 18, 2023
a83e2e7
Windows console ANSI color issue fixed
rupeshs Mar 18, 2023
bb60fda
Update command for downloading the weights to use `curl`
MariusCiocanel Mar 18, 2023
8bb0dd5
Merge pull request #1 from MariusCiocanel/MariusCiocanel-curl-instead…
MariusCiocanel Mar 18, 2023
b64ca1c
Merge pull request #40 from rupeshs/windows-console-ansi-color-fix
antimatter15 Mar 18, 2023
c0e1cb5
🙈 Add output `chat` to `.gitignore`
NatoBoram Mar 18, 2023
f69062f
Do the windows ANSI color fix properly
anzz1 Mar 18, 2023
1b19586
Init the var too
anzz1 Mar 18, 2023
60c84e6
Merge pull request #54 from NatoBoram/feature/gitignore-chat
antimatter15 Mar 18, 2023
ad0f01b
Merge pull request #56 from anzz1/patch-2
antimatter15 Mar 18, 2023
3a208b9
Merge pull request #42 from MariusCiocanel/master
antimatter15 Mar 18, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 96 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,147 @@
name: CI
on: [push, pull_request]

on:
workflow_dispatch: # allows manual triggering
inputs:
create_release:
description: 'Create new release'
required: true
type: boolean
push:
paths: ['.github/workflows/**', 'CMakeLists.txt', 'Makefile', '**.h', '*.c', '**.cpp']
pull_request:
types: [opened, synchronize, edited, reopened, review_requested, ready_for_review]
paths: ['CMakeLists.txt', 'Makefile', '**.h', '*.c', '**.cpp']

env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}

jobs:
ubuntu-latest:
runs-on: ubuntu-latest

steps:
- name: Clone
id: checkout
uses: actions/checkout@v1

- name: Dependencies
id: depends
run: |
sudo apt-get update
sudo apt-get install build-essential

- name: Build
id: make_build
run: |
make

- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: ubuntu
path: |
chat


macOS-latest:
runs-on: macOS-latest

steps:
- name: Clone
id: checkout
uses: actions/checkout@v1

- name: Dependencies
id: depends
run: |
brew update

- name: Build
id: make_build
run: |
make

- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: macos
path: |
chat

# macos-arm64:
# runs-on: macos-arm64

# steps:
# - name: Clone
# id: checkout
# uses: actions/checkout@v1

# - name: Dependencies
# id: depends
# run: |
# brew update

# - name: Build
# id: make_build
# run: |
# make

# - name: Archive production artifacts
# uses: actions/upload-artifact@v3
# with:
# name: macos
# path: |
# chat

windows-latest:
runs-on: windows-latest

steps:
- name: Clone
id: checkout
uses: actions/checkout@v1

- name: Build
id: cmake_build
run: |
mkdir build
cd build
cmake ..
cmake --build . --config Release

- name: Set commit hash variables
id: commit
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
uses: pr-mpt/actions-commit-hash@v2

- name: Pack artifacts
id: pack_artifacts
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
run: |
7z a alpaca-${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}-bin-win-x64.zip .\build\Release\*

- name: Create release
id: create_release
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
uses: zendesk/action-create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}

- name: Upload release
id: upload_release
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: .\alpaca-${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}-bin-win-x64.zip
asset_name: alpaca-${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}-bin-win-x64.zip
asset_content_type: application/octet-stream

# ubuntu-latest-gcc:
# runs-on: ubuntu-latest
#
Expand Down
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/chat

*.o
*.a
.cache/
Expand All @@ -15,9 +17,22 @@ build-sanitize-addr/
build-sanitize-thread/

models/*
*.bin

/main
/quantize

arm_neon.h
compile_commands.json

# Windows CMake files
*.vcxproj
*.filters
*.cmake
*.sln
x64/
Debug/
Release/
CMakeFiles/
CMakeCache.txt
*.dir/
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.8)
project("llama.cpp")
project("alpaca.cpp")

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED true)
Expand Down Expand Up @@ -104,8 +104,8 @@ endif()
# set(LLAMA_EXTRA_FLAGS ${LLAMA_EXTRA_FLAGS} -DGGML_PERF)
# endif()

add_executable(llama
main.cpp
add_executable(chat
chat.cpp
utils.cpp
utils.h)

Expand All @@ -119,10 +119,10 @@ add_library(ggml
ggml.h)

target_compile_definitions(ggml PUBLIC ${LLAMA_EXTRA_FLAGS})
target_compile_definitions(llama PUBLIC ${LLAMA_EXTRA_FLAGS})
target_compile_definitions(chat PUBLIC ${LLAMA_EXTRA_FLAGS})
target_compile_definitions(quantize PUBLIC ${LLAMA_EXTRA_FLAGS})

target_link_libraries(ggml PRIVATE ${LLAMA_EXTRA_LIBS})
target_include_directories(ggml PUBLIC .)
target_link_libraries(quantize PRIVATE ggml)
target_link_libraries(llama PRIVATE ggml)
target_link_libraries(chat PRIVATE ggml)
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ $(info I CC: $(CCV))
$(info I CXX: $(CXXV))
$(info )

default: main quantize
default: chat quantize

#
# Build library
Expand All @@ -191,9 +191,9 @@ utils.o: utils.cpp utils.h
clean:
rm -f *.o main quantize

main: main.cpp ggml.o utils.o
$(CXX) $(CXXFLAGS) main.cpp ggml.o utils.o -o main $(LDFLAGS)
./main -h
chat: chat.cpp ggml.o utils.o
$(CXX) $(CXXFLAGS) chat.cpp ggml.o utils.o -o chat $(LDFLAGS)


quantize: quantize.cpp ggml.o utils.o
$(CXX) $(CXXFLAGS) quantize.cpp ggml.o utils.o -o quantize $(LDFLAGS)
Expand Down
Loading