@@ -1948,7 +1948,6 @@ static void llm_load_tensors(
1948
1948
const int64_t n_vocab = hparams.n_vocab ;
1949
1949
1950
1950
const auto tn = LLM_TN (model.arch );
1951
-
1952
1951
switch (model.arch ) {
1953
1952
case LLM_ARCH_LLAMA:
1954
1953
{
@@ -2777,13 +2776,11 @@ static struct ggml_cgraph * llm_build_baichaun(
2777
2776
2778
2777
struct ggml_tensor * Kcur;
2779
2778
struct ggml_tensor * Qcur;
2780
- switch (model.type )
2781
- {
2779
+ switch (model.type ) {
2782
2780
case MODEL_7B:
2783
2781
Kcur = ggml_rope_custom_inplace (ctx0, ggml_reshape_3d (ctx0, tmpk, n_embd_head, n_head_kv, N), n_past, n_embd_head, 0 , 0 , freq_base, freq_scale);
2784
- Qcur = ggml_rope_custom_inplace (ctx0, ggml_reshape_3d (ctx0, tmpq, n_embd_head, n_head, N), n_past, n_embd_head, 0 , 0 , freq_base, freq_scale);
2782
+ Qcur = ggml_rope_custom_inplace (ctx0, ggml_reshape_3d (ctx0, tmpq, n_embd_head, n_head, N), n_past, n_embd_head, 0 , 0 , freq_base, freq_scale);
2785
2783
break ;
2786
-
2787
2784
case MODEL_13B:
2788
2785
Kcur = ggml_reshape_3d (ctx0, tmpk, n_embd/n_head, n_head, N);
2789
2786
Qcur = ggml_reshape_3d (ctx0, tmpq, n_embd/n_head, n_head, N);
@@ -2797,8 +2794,6 @@ static struct ggml_cgraph * llm_build_baichaun(
2797
2794
2798
2795
offload_func_kq (Qcur);
2799
2796
ggml_set_name (Qcur, " Qcur" );
2800
-
2801
-
2802
2797
2803
2798
// store key and value to memory
2804
2799
{
@@ -2853,13 +2848,11 @@ static struct ggml_cgraph * llm_build_baichaun(
2853
2848
2854
2849
struct ggml_tensor * KQ_masked;
2855
2850
struct ggml_tensor * KQ_scaled_alibi;
2856
- // if model.type == MODEL_13B,here add kq_scaled_alibi
2857
- switch (model.type )
2858
- {
2851
+
2852
+ switch (model.type ) {
2859
2853
case MODEL_7B:
2860
2854
KQ_masked = ggml_diag_mask_inf_inplace (ctx0, KQ_scaled, n_past);
2861
2855
break ;
2862
-
2863
2856
case MODEL_13B:
2864
2857
KQ_scaled_alibi =ggml_alibi (ctx0, KQ_scaled, n_past, n_head, 8 );
2865
2858
ggml_set_name (KQ_scaled_alibi, " KQ_scaled_alibi" );
0 commit comments