Skip to content

Commit 19d5356

Browse files
committed
refactored.
1 parent d5af436 commit 19d5356

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+7489
-6351
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -490,8 +490,8 @@ jobs:
490490
-DGGML_SYCL_F16=ON
491491
cmake --build build --config Release -j $(nproc)
492492
493-
build-linux-cross:
494-
uses: ./.github/workflows/build-linux-cross.yml
493+
#build-linux-cross:
494+
# uses: ./.github/workflows/build-linux-cross.yml
495495

496496
macOS-latest-cmake-ios:
497497
runs-on: macos-latest

CMakeLists.txt

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,66 @@ set(core_files src/backend.cpp
5555
src/unicode-data.cpp
5656
src/vision_process.cpp
5757
src/audio_process.cpp
58+
models/adept.cpp
59+
models/allenai.cpp
60+
models/alphageo.cpp
61+
models/apriel.cpp
62+
models/aquila.cpp
63+
models/baichuan.cpp
64+
models/bailing.cpp
65+
models/bce.cpp
66+
models/bge.cpp
67+
models/bluelm.cpp
68+
models/chatglm.cpp
69+
models/characterglm.cpp
70+
models/codegeex.cpp
71+
models/codefuse.cpp
72+
models/codellama.cpp
73+
models/cohere.cpp
74+
models/decilm.cpp
75+
models/deepseek.cpp
76+
models/dolphinphi2.cpp
5877
models/ernie.cpp
5978
models/exaone.cpp
79+
models/falcon.cpp
80+
models/gemma.cpp
81+
models/gigachat.cpp
82+
models/granite.cpp
83+
models/groq.cpp
84+
models/grok.cpp
85+
models/hermes.cpp
6086
models/hunyuan.cpp
87+
models/index.cpp
88+
models/instella.cpp
89+
models/internlm.cpp
90+
models/jina.cpp
6191
models/llama.cpp
92+
models/m_a_p.cpp
93+
models/megrez.cpp
94+
models/minicpm.cpp
95+
models/mistral.cpp
96+
models/moonshot.cpp
97+
models/neuralbeagle.cpp
98+
models/numinamath.cpp
99+
models/orpheus.cpp
100+
models/openchat.cpp
101+
models/orion.cpp
102+
models/oute.cpp
62103
models/pangu.cpp
104+
models/phi.cpp
63105
models/qwen.cpp
106+
models/reka.cpp
64107
models/smol.cpp
108+
models/solar.cpp
109+
models/stablelm.cpp
110+
models/starcoder.cpp
111+
models/starling.cpp
112+
models/telechat.cpp
113+
models/tigerbot.cpp
114+
models/wizard.cpp
115+
models/xverse.cpp
116+
models/yi.cpp
117+
models/zhinao.cpp
65118
)
66119

67120
add_library(libchatllm SHARED EXCLUDE_FROM_ALL src/main.cpp ${core_files})

models/adept.cpp

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
#include "../src/models.h"
2+
#include "../src/models_priv.h"
3+
#include "../src/vision_process.h"
14

2-
namespace persimmon
5+
namespace chatllm::adept::persimmon
36
{
47
struct Config : public BaseConfig
58
{
@@ -149,7 +152,7 @@ namespace persimmon
149152
}
150153
}
151154

152-
namespace fuyu
155+
namespace chatllm::adept::fuyu
153156
{
154157
struct Config : public persimmon::Config
155158
{
@@ -278,7 +281,7 @@ namespace fuyu
278281
const int total_patches = tok->get_image_total_emb_vectors();
279282
ggml::tensor *patches = ggml::new_tensor_2d(&ctx, ggml::type::GGML_TYPE_F32, 3 * vis_config.patch_size * vis_config.patch_size, total_patches);
280283

281-
dbg_ctx = &ctx;
284+
set_dbg_ctx(&ctx);
282285

283286
auto r = vis_emb->vision_embed.forward(&ctx, patches);
284287

@@ -454,4 +457,10 @@ namespace fuyu
454457

455458
tok->encode("\n\n", ids, false, false);
456459
}
460+
}
461+
462+
namespace chatllm
463+
{
464+
REGISTER_MODEL_LOADER(PERSIMMON, adept::persimmon, 1);
465+
REGISTER_MODEL_LOADER(FUYU, adept::fuyu, 1);
457466
}

0 commit comments

Comments
 (0)