colab
!pip install -U transformers sentencepiece
!pip install llama-cpp-python
from llama_cpp import Llama
llm = Llama.from_pretrained(
repo_id="goodasdgood/SILMA-9B-Instruct-v1.0-IQ4_NL-GGUF",
filename="silma-9b-instruct-v1.0-iq4_nl-imat.gguf", # Use the correct filename from the available files
)
llm.create_chat_completion(
messages = [
{
"role": "user",
"content": "ู
ู ูู ูุงุจูููู ุจููุงุจุฑุชุ"
}
]
)
silma-9b-instruct-v1.0-iq4_nl-imat.gguf:โ100%
โ5.44G/5.44Gโ[02:50<00:00,โ25.6MB/s]
llama_model_loader: loaded meta data with 42 key-value pairs and 464 tensors from /root/.cache/huggingface/hub/models--goodasdgood--SILMA-9B-Instruct-v1.0-IQ4_NL-GGUF/snapshots/c8712aebe03414cd19bd023eb184a1a9e2d1c131/./silma-9b-instruct-v1.0-iq4_nl-imat.gguf (version GGUF V3 (latest))
llama_model_loader: Dumping metadata keys/values. Note: KV overrides do not apply in this output.
llama_model_loader: - kv 0: general.architecture str = gemma2
llama_model_loader: - kv 1: general.type str = model
llama_model_loader: - kv 2: general.name str = Gemma 2 9b It
llama_model_loader: - kv 3: general.version str = v1.0
llama_model_loader: - kv 4: general.organization str = Google
llama_model_loader: - kv 5: general.finetune str = it
llama_model_loader: - kv 6: general.basename str = gemma-2
llama_model_loader: - kv 7: general.size_label str = 9B
llama_model_loader: - kv 8: general.license str = gemma
llama_model_loader: - kv 9: general.tags arr[str,2] = ["conversational", "text-generation"]
llama_model_loader: - kv 10: general.languages arr[str,2] = ["ar", "en"]
llama_model_loader: - kv 11: gemma2.context_length u32 = 8192
llama_model_loader: - kv 12: gemma2.embedding_length u32 = 3584
llama_model_loader: - kv 13: gemma2.block_count u32 = 42
llama_model_loader: - kv 14: gemma2.feed_forward_length u32 = 14336
llama_model_loader: - kv 15: gemma2.attention.head_count u32 = 16
llama_model_loader: - kv 16: gemma2.attention.head_count_kv u32 = 8
llama_model_loader: - kv 17: gemma2.attention.layer_norm_rms_epsilon f32 = 0.000001
llama_model_loader: - kv 18: gemma2.attention.key_length u32 = 256
llama_model_loader: - kv 19: gemma2.attention.value_length u32 = 256
llama_model_loader: - kv 20: general.file_type u32 = 25
llama_model_loader: - kv 21: gemma2.attn_logit_softcapping f32 = 50.000000
llama_model_loader: - kv 22: gemma2.final_logit_softcapping f32 = 30.000000
llama_model_loader: - kv 23: gemma2.attention.sliding_window u32 = 4096
llama_model_loader: - kv 24: tokenizer.ggml.model str = llama
llama_model_loader: - kv 25: tokenizer.ggml.pre str = default
llama_model_loader: - kv 26: tokenizer.ggml.tokens arr[str,256000] = ["", "", "", "", ...
llama_model_loader: - kv 27: tokenizer.ggml.scores arr[f32,256000] = [-1000.000000, -1000.000000, -1000.00...
llama_model_loader: - kv 28: tokenizer.ggml.token_type arr[i32,256000] = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, ...
llama_model_loader: - kv 29: tokenizer.ggml.bos_token_id u32 = 2
llama_model_loader: - kv 30: tokenizer.ggml.eos_token_id u32 = 1
llama_model_loader: - kv 31: tokenizer.ggml.unknown_token_id u32 = 3
llama_model_loader: - kv 32: tokenizer.ggml.padding_token_id u32 = 0
llama_model_loader: - kv 33: tokenizer.ggml.add_bos_token bool = true
llama_model_loader: - kv 34: tokenizer.ggml.add_eos_token bool = false
llama_model_loader: - kv 35: tokenizer.chat_template str = {{ '' }}{% if messages[0]['role'...
llama_model_loader: - kv 36: tokenizer.ggml.add_space_prefix bool = false
llama_model_loader: - kv 37: general.quantization_version u32 = 2
llama_model_loader: - kv 38: quantize.imatrix.file str = llama.cpp/imatrix.dat
llama_model_loader: - kv 39: quantize.imatrix.dataset str = groups_merged.txt
llama_model_loader: - kv 40: quantize.imatrix.entries_count i32 = 294
llama_model_loader: - kv 41: quantize.imatrix.chunks_count i32 = 40
llama_model_loader: - type f32: 169 tensors
llama_model_loader: - type q6_K: 1 tensors
llama_model_loader: - type iq4_nl: 294 tensors
llm_load_vocab: special tokens cache size = 249
llm_load_vocab: token to piece cache size = 1.6014 MB
llm_load_print_meta: format = GGUF V3 (latest)
llm_load_print_meta: arch = gemma2
llm_load_print_meta: vocab type = SPM
llm_load_print_meta: n_vocab = 256000
llm_load_print_meta: n_merges = 0
llm_load_print_meta: vocab_only = 0
llm_load_print_meta: n_ctx_train = 8192
llm_load_print_meta: n_embd = 3584
llm_load_print_meta: n_layer = 42
llm_load_print_meta: n_head = 16
llm_load_print_meta: n_head_kv = 8
llm_load_print_meta: n_rot = 256
llm_load_print_meta: n_swa = 4096
llm_load_print_meta: n_embd_head_k = 256
llm_load_print_meta: n_embd_head_v = 256
llm_load_print_meta: n_gqa = 2
llm_load_print_meta: n_embd_k_gqa = 2048
llm_load_print_meta: n_embd_v_gqa = 2048
llm_load_print_meta: f_norm_eps = 0.0e+00
llm_load_print_meta: f_norm_rms_eps = 1.0e-06
llm_load_print_meta: f_clamp_kqv = 0.0e+00
llm_load_print_meta: f_max_alibi_bias = 0.0e+00
llm_load_print_meta: f_logit_scale = 0.0e+00
llm_load_print_meta: n_ff = 14336
llm_load_print_meta: n_expert = 0
llm_load_print_meta: n_expert_used = 0
llm_load_print_meta: causal attn = 1
llm_load_print_meta: pooling type = 0
llm_load_print_meta: rope type = 2
llm_load_print_meta: rope scaling = linear
llm_load_print_meta: freq_base_train = 10000.0
llm_load_print_meta: freq_scale_train = 1
llm_load_print_meta: n_ctx_orig_yarn = 8192
llm_load_print_meta: rope_finetuned = unknown
llm_load_print_meta: ssm_d_conv = 0
llm_load_print_meta: ssm_d_inner = 0
llm_load_print_meta: ssm_d_state = 0
llm_load_print_meta: ssm_dt_rank = 0
llm_load_print_meta: ssm_dt_b_c_rms = 0
llm_load_print_meta: model type = 9B
llm_load_print_meta: model ftype = IQ4_NL - 4.5 bpw
llm_load_print_meta: model params = 9.24 B
llm_load_print_meta: model size = 5.06 GiB (4.71 BPW)
llm_load_print_meta: general.name = Gemma 2 9b It
llm_load_print_meta: BOS token = 2 ''
llm_load_print_meta: EOS token = 1 ''
llm_load_print_meta: UNK token = 3 ''
llm_load_print_meta: PAD token = 0 ''
llm_load_print_meta: LF token = 227 '<0x0A>'
llm_load_print_meta: EOT token = 107 ''
llm_load_print_meta: max token length = 48
llm_load_tensors: ggml ctx size = 0.21 MiB
llm_load_tensors: CPU buffer size = 5185.21 MiB
..............................................................................
llama_new_context_with_model: n_ctx = 512
llama_new_context_with_model: n_batch = 512
llama_new_context_with_model: n_ubatch = 512
llama_new_context_with_model: flash_attn = 0
llama_new_context_with_model: freq_base = 10000.0
llama_new_context_with_model: freq_scale = 1
llama_kv_cache_init: CPU KV buffer size = 168.00 MiB
llama_new_context_with_model: KV self size = 168.00 MiB, K (f16): 84.00 MiB, V (f16): 84.00 MiB
llama_new_context_with_model: CPU output buffer size = 0.98 MiB
llama_new_context_with_model: CPU compute buffer size = 507.00 MiB
llama_new_context_with_model: graph nodes = 1690
llama_new_context_with_model: graph splits = 1
AVX = 1 | AVX_VNNI = 0 | AVX2 = 1 | AVX512 = 0 | AVX512_VBMI = 0 | AVX512_VNNI = 0 | AVX512_BF16 = 0 | FMA = 1 | NEON = 0 | SVE = 0 | ARM_FMA = 0 | F16C = 1 | FP16_VA = 0 | WASM_SIMD = 0 | BLAS = 0 | SSE3 = 1 | SSSE3 = 1 | VSX = 0 | MATMUL_INT8 = 0 | LLAMAFILE = 1 |
Model metadata: {'quantize.imatrix.chunks_count': '40', 'quantize.imatrix.entries_count': '294', 'general.quantization_version': '2', 'quantize.imatrix.file': 'llama.cpp/imatrix.dat', 'tokenizer.ggml.add_space_prefix': 'false', 'tokenizer.chat_template': "{{ '' }}{% if messages[0]['role'] == 'system' %}{% set system_message = messages[0]['content'] %}{% endif %}{% if system_message is defined %}{{ system_message }}{% endif %}{% for message in messages %}{% set content = message['content'] %}{% if message['role'] == 'user' %}{{ 'user\n' + content + '\nmodel\n' }}{% elif message['role'] == 'assistant' %}{{ content + '\n' }}{% endif %}{% endfor %}", 'gemma2.feed_forward_length': '14336', 'gemma2.block_count': '42', 'tokenizer.ggml.pre': 'default', 'general.license': 'gemma', 'general.version': 'v1.0', 'general.type': 'model', 'gemma2.embedding_length': '3584', 'general.basename': 'gemma-2', 'tokenizer.ggml.padding_token_id': '0', 'gemma2.context_length': '8192', 'general.architecture': 'gemma2', 'gemma2.attention.head_count': '16', 'tokenizer.ggml.add_eos_token': 'false', 'general.organization': 'Google', 'gemma2.attention.head_count_kv': '8', 'quantize.imatrix.dataset': 'groups_merged.txt', 'gemma2.attention.key_length': '256', 'gemma2.attention.value_length': '256', 'gemma2.attention.layer_norm_rms_epsilon': '0.000001', 'general.finetune': 'it', 'general.file_type': '25', 'gemma2.attention.sliding_window': '4096', 'gemma2.attn_logit_softcapping': '50.000000', 'gemma2.final_logit_softcapping': '30.000000', 'tokenizer.ggml.model': 'llama', 'general.name': 'Gemma 2 9b It', 'tokenizer.ggml.bos_token_id': '2', 'tokenizer.ggml.eos_token_id': '1', 'tokenizer.ggml.unknown_token_id': '3', 'general.size_label': '9B', 'tokenizer.ggml.add_bos_token': 'true'}
Available chat formats from metadata: chat_template.default
Using gguf chat template: {{ '' }}{% if messages[0]['role'] == 'system' %}{% set system_message = messages[0]['content'] %}{% endif %}{% if system_message is defined %}{{ system_message }}{% endif %}{% for message in messages %}{% set content = message['content'] %}{% if message['role'] == 'user' %}{{ 'user
' + content + '
model
' }}{% elif message['role'] == 'assistant' %}{{ content + '
' }}{% endif %}{% endfor %}
Using chat eos_token:
Using chat bos_token:
llama_print_timings: load time = 14827.29 ms
llama_print_timings: sample time = 11.79 ms / 52 runs ( 0.23 ms per token, 4409.40 tokens per second)
llama_print_timings: prompt eval time = 14827.22 ms / 19 tokens ( 780.38 ms per token, 1.28 tokens per second)
llama_print_timings: eval time = 63728.34 ms / 51 runs ( 1249.58 ms per token, 0.80 tokens per second)
llama_print_timings: total time = 78749.08 ms / 70 tokens
{'id': 'chatcmpl-1fe3c2b0-fde1-4a26-b2c8-f1f8a1c2aa5a',
'object': 'chat.completion',
'created': 1726272906,
'model': '/root/.cache/huggingface/hub/models--goodasdgood--SILMA-9B-Instruct-v1.0-IQ4_NL-GGUF/snapshots/c8712aebe03414cd19bd023eb184a1a9e2d1c131/./silma-9b-instruct-v1.0-iq4_nl-imat.gguf',
'choices': [{'index': 0,
'message': {'role': 'assistant',
'content': 'ูุงุจูููู ุจููุงุจุฑุช ูุงู ูุงุฆุฏ ุนุณูุฑู ูุณูุงุณู ูุฑูุณูุ ุญูู
ูุฑูุณุง ูุฅู
ุจุฑุงุทูุฑ ู
ู ุนุงู
1804 ุฅูู ุนุงู
1814ุ ุซู
ู
ุฑุฉ ุฃุฎุฑู ูู ุนุงู
1815.'},
'logprobs': None,
'finish_reason': 'stop'}],
'usage': {'prompt_tokens': 19, 'completion_tokens': 51, 'total_tokens': 70}}