ActionPower commited on
Commit
6485c4c
·
0 Parent(s):

Initial release

Browse files
.gitattributes ADDED
@@ -0,0 +1 @@
 
 
1
+ *.gguf filter=lfs diff=lfs merge=lfs -text
ELLI-nipa-1p58b-i2s.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e47a9fd9a1cc2fefbf81e15fecc09e45da048936d9025f1b825855aa42f956cb
3
+ size 614944384
README.md ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - ko
5
+ base_model: Qwen/Qwen3-1.7B
6
+ pipeline_tag: text-generation
7
+ tags:
8
+ - gguf
9
+ - 1.58-bit
10
+ - summarization
11
+ ---
12
+
13
+ # ELLI-nipa
14
+
15
+ 회의·강의 녹취록을 입력받아 서식 선택, 화자 이름 입력, 요약, 보고서 작성을 수행하는 한국어 온디바이스 모델입니다.
16
+ Qwen3-1.7B를 4개 Task로 학습한 뒤 1.58-bit로 경량화했습니다.
17
+
18
+ | 항목 | 내용 |
19
+ |---|---|
20
+ | 파일 | `ELLI-nipa-1p58b-i2s.gguf` (586MB) |
21
+ | 형식 | GGUF, I2_S (1.58-bit 가중치) |
22
+ | 구동 | bitnet.cpp (`runtime` 폴더의 패치 적용), AVX2 지원 x86-64 CPU |
23
+ | 학습 코드 | https://github.com/actionpower/elli-nipa |
24
+
25
+ ## 출력 형식
26
+
27
+ | Task | 출력 |
28
+ |---|---|
29
+ | 서식 선택 | `<템플릿>서식 이름</템플릿>` |
30
+ | 화자 이름 입력 | `<화자표>화자 N = 이름(역할)</화자표>` |
31
+ | 요약 | `<정리본>요약</정리본>` |
32
+ | 보고서 작성 | `<보고서>보고서</보고서>` |
33
+
34
+ ## 실행
35
+
36
+ bitnet.cpp에 `runtime` 폴더의 패치를 적용하여 빌드합니다.
37
+
38
+ ```bash
39
+ hf download ActionPower/elli-nipa --local-dir elli-nipa
40
+ git clone https://github.com/microsoft/BitNet.git
41
+ cd BitNet
42
+ git checkout 0b341e582afbf9e1011f24744b554c96a3477eb5
43
+ git submodule update --init --recursive
44
+ git apply ../elli-nipa/runtime/bitnet.patch
45
+ git -C 3rdparty/llama.cpp apply ../../../elli-nipa/runtime/llama.cpp.patch
46
+ cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DLLAMA_BUILD_SERVER=OFF -DLLAMA_BUILD_TOOLS=ON -DLLAMA_BUILD_COMMON=ON -DBUILD_SHARED_LIBS=OFF
47
+ cmake --build build --config Release -j
48
+ build/bin/llama-cli -m ../elli-nipa/ELLI-nipa-1p58b-i2s.gguf -c 8192 --temp 0 -st -f prompt.txt
49
+ ```
50
+
51
+ `prompt.txt`에는 Task의 입력을 넣습니다. 입력 예시는 학습 코드 저장소의 `samples`에 있습니다.
52
+
53
+ Windows에서는 Clang으로 빌드합니다. Visual Studio 개발자 명령 프롬프트에서 cmake 구성 명령에 `-G Ninja -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl`을 추가하며, 실행 파일은 `build\bin\llama-cli.exe`입니다.
runtime/LICENSE.BitNet ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) Microsoft Corporation.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE
runtime/LICENSE.llama.cpp ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2023-2026 The ggml authors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
runtime/bitnet.patch ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/CMakeLists.txt b/CMakeLists.txt
2
+ index 5c8382e..52aabbb 100644
3
+ --- a/CMakeLists.txt
4
+ +++ b/CMakeLists.txt
5
+ @@ -39,7 +39,7 @@ endif()
6
+ find_package(Threads REQUIRED)
7
+
8
+ add_subdirectory(src)
9
+ -set(LLAMA_BUILD_SERVER ON CACHE BOOL "Build llama.cpp server" FORCE)
10
+ +set(LLAMA_BUILD_SERVER ON CACHE BOOL "Build llama.cpp server")
11
+ add_subdirectory(3rdparty/llama.cpp)
12
+
13
+ # install
runtime/llama.cpp.patch ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/src/models/qwen3.cpp b/src/models/qwen3.cpp
2
+ index d271b555e..024b043a6 100644
3
+ --- a/src/models/qwen3.cpp
4
+ +++ b/src/models/qwen3.cpp
5
+ @@ -173,12 +173,17 @@ llama_model_qwen3::graph::graph(const llama_model & model, const llm_graph_param
6
+ LLM_NORM_RMS, il);
7
+ cb(cur, "ffn_norm", il);
8
+
9
+ - if (model.layers[il].ffn_gate_norm_in) {
10
+ + if (model.layers[il].ffn_gate_norm_in ||
11
+ + model.layers[il].ffn_up_norm_in ||
12
+ + model.layers[il].ffn_down_norm_in) {
13
+ // BitNet per-projection norms for MLP
14
+ - ggml_tensor * gate_inp = build_norm(cur,
15
+ - model.layers[il].ffn_gate_norm_in, NULL,
16
+ - LLM_NORM_RMS, il);
17
+ - cb(gate_inp, "ffn_gate_norm_in", il);
18
+ + ggml_tensor * gate_inp = cur;
19
+ + if (model.layers[il].ffn_gate_norm_in) {
20
+ + gate_inp = build_norm(cur,
21
+ + model.layers[il].ffn_gate_norm_in, NULL,
22
+ + LLM_NORM_RMS, il);
23
+ + cb(gate_inp, "ffn_gate_norm_in", il);
24
+ + }
25
+
26
+ ggml_tensor * up_inp = cur;
27
+ if (model.layers[il].ffn_up_norm_in) {
28
+ diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
29
+ index 780df3266..55cbc2b54 100644
30
+ --- a/tools/CMakeLists.txt
31
+ +++ b/tools/CMakeLists.txt
32
+ @@ -21,10 +21,10 @@ else()
33
+ add_subdirectory(completion)
34
+ add_subdirectory(perplexity)
35
+ add_subdirectory(quantize)
36
+ + add_subdirectory(server)
37
+ + add_subdirectory(cli)
38
+ if (LLAMA_BUILD_SERVER)
39
+ add_subdirectory(ui)
40
+ - add_subdirectory(cli)
41
+ - add_subdirectory(server)
42
+ endif()
43
+ add_subdirectory(tokenize)
44
+ add_subdirectory(parser)
45
+ diff --git a/tools/server/CMakeLists.txt b/tools/server/CMakeLists.txt
46
+ index b5c40884f..fb1f7220b 100644
47
+ --- a/tools/server/CMakeLists.txt
48
+ +++ b/tools/server/CMakeLists.txt
49
+ @@ -33,6 +33,7 @@ target_link_libraries(${TARGET} PUBLIC llama-common mtmd ${CMAKE_THREAD_LIBS_INI
50
+
51
+ # llama-server-impl: server logic, reusable by app
52
+
53
+ +if (LLAMA_BUILD_SERVER)
54
+ set(TARGET llama-server-impl)
55
+
56
+ add_library(${TARGET}
57
+ @@ -61,3 +62,4 @@ install(TARGETS ${TARGET} RUNTIME)
58
+
59
+ target_link_libraries(${TARGET} PRIVATE llama-server-impl)
60
+ target_compile_features(${TARGET} PRIVATE cxx_std_17)
61
+ +endif()