commit 4c80cd5747ad550616040df49f017870343e8e77 Author: ModelHub XC Date: Wed May 27 01:00:14 2026 +0800 初始化项目,由ModelHub XC社区提供模型 Model: second-state/CodeLlama-13B-Instruct-GGUF Source: Original Platform diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..f15b49c --- /dev/null +++ b/.gitattributes @@ -0,0 +1,36 @@ +*.7z filter=lfs diff=lfs merge=lfs -text +*.arrow filter=lfs diff=lfs merge=lfs -text +*.bin filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.ckpt filter=lfs diff=lfs merge=lfs -text +*.ftz filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.h5 filter=lfs diff=lfs merge=lfs -text +*.joblib filter=lfs diff=lfs merge=lfs -text +*.lfs.* filter=lfs diff=lfs merge=lfs -text +*.mlmodel filter=lfs diff=lfs merge=lfs -text +*.model filter=lfs diff=lfs merge=lfs -text +*.msgpack filter=lfs diff=lfs merge=lfs -text +*.npy filter=lfs diff=lfs merge=lfs -text +*.npz filter=lfs diff=lfs merge=lfs -text +*.onnx filter=lfs diff=lfs merge=lfs -text +*.ot filter=lfs diff=lfs merge=lfs -text +*.parquet filter=lfs diff=lfs merge=lfs -text +*.pb filter=lfs diff=lfs merge=lfs -text +*.pickle filter=lfs diff=lfs merge=lfs -text +*.pkl filter=lfs diff=lfs merge=lfs -text +*.pt filter=lfs diff=lfs merge=lfs -text +*.pth filter=lfs diff=lfs merge=lfs -text +*.rar filter=lfs diff=lfs merge=lfs -text +*.safetensors filter=lfs diff=lfs merge=lfs -text +saved_model/**/* filter=lfs diff=lfs merge=lfs -text +*.tar.* filter=lfs diff=lfs merge=lfs -text +*.tar filter=lfs diff=lfs merge=lfs -text +*.tflite filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.wasm filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text +*tfevents* filter=lfs diff=lfs merge=lfs -text +*.gguf filter=lfs diff=lfs merge=lfs -text diff --git a/CodeLlama-13b-Instruct-hf-Q2_K.gguf b/CodeLlama-13b-Instruct-hf-Q2_K.gguf new file mode 100644 index 0000000..6e0c4f7 --- /dev/null +++ b/CodeLlama-13b-Instruct-hf-Q2_K.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6dfc9309d48fffd2ecbdc0571f96a99da7d7bf094208a713e9a4cb8205546f29 +size 5429442880 diff --git a/CodeLlama-13b-Instruct-hf-Q3_K_L.gguf b/CodeLlama-13b-Instruct-hf-Q3_K_L.gguf new file mode 100644 index 0000000..f5c5719 --- /dev/null +++ b/CodeLlama-13b-Instruct-hf-Q3_K_L.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:52a7dd56e80f0d362635be72bfc5dc76eda5f4317ab55d6a04f824b1a7b5e798 +size 6929662400 diff --git a/CodeLlama-13b-Instruct-hf-Q3_K_M.gguf b/CodeLlama-13b-Instruct-hf-Q3_K_M.gguf new file mode 100644 index 0000000..49a09c5 --- /dev/null +++ b/CodeLlama-13b-Instruct-hf-Q3_K_M.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d62f4656f12c2cc6763c9ea47fc1474dbaa5ab6adee4f3452f91da979fdbbabf +size 6337872320 diff --git a/CodeLlama-13b-Instruct-hf-Q3_K_S.gguf b/CodeLlama-13b-Instruct-hf-Q3_K_S.gguf new file mode 100644 index 0000000..35927cc --- /dev/null +++ b/CodeLlama-13b-Instruct-hf-Q3_K_S.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8dbe16cb1b2046faac05e8803822309deb9e1bfc74a4d05c2eefff813e4ae44f +size 5659083200 diff --git a/CodeLlama-13b-Instruct-hf-Q4_0.gguf b/CodeLlama-13b-Instruct-hf-Q4_0.gguf new file mode 100644 index 0000000..a278047 --- /dev/null +++ b/CodeLlama-13b-Instruct-hf-Q4_0.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cd4e71c660c8d04ec0c12806a69a05651c1882308323714a8e7bf61e94102830 +size 7365948480 diff --git a/CodeLlama-13b-Instruct-hf-Q4_K_M.gguf b/CodeLlama-13b-Instruct-hf-Q4_K_M.gguf new file mode 100644 index 0000000..52a08c0 --- /dev/null +++ b/CodeLlama-13b-Instruct-hf-Q4_K_M.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e2ad727d4893bc44add809e992c8f584e4fb1e986163a5b7510e2cc1f34b3c55 +size 7866070080 diff --git a/CodeLlama-13b-Instruct-hf-Q4_K_S.gguf b/CodeLlama-13b-Instruct-hf-Q4_K_S.gguf new file mode 100644 index 0000000..8dd289f --- /dev/null +++ b/CodeLlama-13b-Instruct-hf-Q4_K_S.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:611b17920328206a9c0ae7928c66bb52d6d986ce35a7fd82d9036b0bc9ef1718 +size 7414445120 diff --git a/CodeLlama-13b-Instruct-hf-Q5_0.gguf b/CodeLlama-13b-Instruct-hf-Q5_0.gguf new file mode 100644 index 0000000..37cdbff --- /dev/null +++ b/CodeLlama-13b-Instruct-hf-Q5_0.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aff52f07419e1bfbb452644960b0fa63907f40689f9a85f580e3813ffb54fa3c +size 8972409920 diff --git a/CodeLlama-13b-Instruct-hf-Q5_K_M.gguf b/CodeLlama-13b-Instruct-hf-Q5_K_M.gguf new file mode 100644 index 0000000..557c662 --- /dev/null +++ b/CodeLlama-13b-Instruct-hf-Q5_K_M.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b30d01b5a22f2b3dc6cd01084b50114dde5e63cbc240ee7ad20ebbd6c63eab95 +size 9230048320 diff --git a/CodeLlama-13b-Instruct-hf-Q5_K_S.gguf b/CodeLlama-13b-Instruct-hf-Q5_K_S.gguf new file mode 100644 index 0000000..4151b9a --- /dev/null +++ b/CodeLlama-13b-Instruct-hf-Q5_K_S.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5bdcb03bada3c3fa7138752df6c8f804d8fad511e72d97ecdef5bea1adc785b3 +size 8972409920 diff --git a/CodeLlama-13b-Instruct-hf-Q6_K.gguf b/CodeLlama-13b-Instruct-hf-Q6_K.gguf new file mode 100644 index 0000000..91a52d4 --- /dev/null +++ b/CodeLlama-13b-Instruct-hf-Q6_K.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b86d1658be2bf2b03d764d3e97e6a19ce6367a301192945a8358d7d51a9c67ed +size 10679275200 diff --git a/CodeLlama-13b-Instruct-hf-Q8_0.gguf b/CodeLlama-13b-Instruct-hf-Q8_0.gguf new file mode 100644 index 0000000..20dee2c --- /dev/null +++ b/CodeLlama-13b-Instruct-hf-Q8_0.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:44a69ac2d210548b1edc0f0b622a2c196e364d5923f695327c3b506f8581eb95 +size 13831494080 diff --git a/README.md b/README.md new file mode 100644 index 0000000..9f2a9ff --- /dev/null +++ b/README.md @@ -0,0 +1,70 @@ +--- +language: +- code +license: llama2 +tags: +- llama-2 +model_name: CodeLlama 13B Instruct +base_model: codellama/CodeLlama-13b-Instruct-hf +inference: false +model_creator: Meta +model_type: llama +pipeline_tag: text-generation +quantized_by: Second State Inc. +--- + + + +
+ +
+
+ + +# CodeLlama-13B-Instruct + +## Original Model + +[codellama/CodeLlama-13b-Instruct-hf](https://huggingface.co/codellama/CodeLlama-13b-Instruct-hf) + +## Run with LlamaEdge + +- LlamaEdge version: [v0.2.8](https://github.com/LlamaEdge/LlamaEdge/releases/tag/0.2.8) and above + +- Prompt template + + - Prompt type: `codellama-instruct` + + - Prompt string + + ```text + [INST] <> + Write code to solve the following coding problem that obeys the constraints and passes the example test cases. Please wrap your code answer using ```: <> + + {prompt} [/INST] + ``` + +- Context size: `5120` + +- Run as LlamaEdge command app + + ```bash + wasmedge --dir .:. --nn-preload default:GGML:AUTO:CodeLlama-13b-Instruct-hf-Q5_K_M.gguf llama-chat.wasm -p codellama-instruct + ``` + +## Quantized GGUF Models + +| Name | Quant method | Bits | Size | Use case | +| ---- | ---- | ---- | ---- | ----- | +| [CodeLlama-13b-Instruct-hf-Q2_K.gguf](https://huggingface.co/second-state/CodeLlama-13B-Instruct-GGUF/blob/main/CodeLlama-13b-Instruct-hf-Q2_K.gguf) | Q2_K | 2 | 5.43 GB| smallest, significant quality loss - not recommended for most purposes | +| [CodeLlama-13b-Instruct-hf-Q3_K_L.gguf](https://huggingface.co/second-state/CodeLlama-13B-Instruct-GGUF/blob/main/CodeLlama-13b-Instruct-hf-Q3_K_L.gguf) | Q3_K_L | 3 | 6.93 GB| small, substantial quality loss | +| [CodeLlama-13b-Instruct-hf-Q3_K_M.gguf](https://huggingface.co/second-state/CodeLlama-13B-Instruct-GGUF/blob/main/CodeLlama-13b-Instruct-hf-Q3_K_M.gguf) | Q3_K_M | 3 | 6.34 GB| very small, high quality loss | +| [CodeLlama-13b-Instruct-hf-Q3_K_S.gguf](https://huggingface.co/second-state/CodeLlama-13B-Instruct-GGUF/blob/main/CodeLlama-13b-Instruct-hf-Q3_K_S.gguf) | Q3_K_S | 3 | 5.66 GB| very small, high quality loss | +| [CodeLlama-13b-Instruct-hf-Q4_0.gguf](https://huggingface.co/second-state/CodeLlama-13B-Instruct-GGUF/blob/main/CodeLlama-13b-Instruct-hf-Q4_0.gguf) | Q4_0 | 4 | 7.37 GB| legacy; small, very high quality loss - prefer using Q3_K_M | +| [CodeLlama-13b-Instruct-hf-Q4_K_M.gguf](https://huggingface.co/second-state/CodeLlama-13B-Instruct-GGUF/blob/main/CodeLlama-13b-Instruct-hf-Q4_K_M.gguf) | Q4_K_M | 4 | 7.87 GB| medium, balanced quality - recommended | +| [CodeLlama-13b-Instruct-hf-Q4_K_S.gguf](https://huggingface.co/second-state/CodeLlama-13B-Instruct-GGUF/blob/main/CodeLlama-13b-Instruct-hf-Q4_K_S.gguf) | Q4_K_S | 4 | 7.41 GB| small, greater quality loss | +| [CodeLlama-13b-Instruct-hf-Q5_0.gguf](https://huggingface.co/second-state/CodeLlama-13B-Instruct-GGUF/blob/main/CodeLlama-13b-Instruct-hf-Q5_0.gguf) | Q5_0 | 5 | 8.97 GB| legacy; medium, balanced quality - prefer using Q4_K_M | +| [CodeLlama-13b-Instruct-hf-Q5_K_M.gguf](https://huggingface.co/second-state/CodeLlama-13B-Instruct-GGUF/blob/main/CodeLlama-13b-Instruct-hf-Q5_K_M.gguf) | Q5_K_M | 5 | 9.23 GB| large, very low quality loss - recommended | +| [CodeLlama-13b-Instruct-hf-Q5_K_S.gguf](https://huggingface.co/second-state/CodeLlama-13B-Instruct-GGUF/blob/main/CodeLlama-13b-Instruct-hf-Q5_K_S.gguf) | Q5_K_S | 5 | 8.97 GB| large, low quality loss - recommended | +| [CodeLlama-13b-Instruct-hf-Q6_K.gguf](https://huggingface.co/second-state/CodeLlama-13B-Instruct-GGUF/blob/main/CodeLlama-13b-Instruct-hf-Q6_K.gguf) | Q6_K | 6 | 10.7 GB| very large, extremely low quality loss | +| [CodeLlama-13b-Instruct-hf-Q8_0.gguf](https://huggingface.co/second-state/CodeLlama-13B-Instruct-GGUF/blob/main/CodeLlama-13b-Instruct-hf-Q8_0.gguf) | Q8_0 | 8 | 13.8 GB| very large, extremely low quality loss - not recommended | diff --git a/codellama-13b-instruct.Q4_0.gguf b/codellama-13b-instruct.Q4_0.gguf new file mode 100644 index 0000000..0ff2220 --- /dev/null +++ b/codellama-13b-instruct.Q4_0.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:693021fa3a170a348b0a6104ab7d3a8c523331826a944dc0371fecd922df89dd +size 7365948416 diff --git a/config.json b/config.json new file mode 100644 index 0000000..ab89d9a --- /dev/null +++ b/config.json @@ -0,0 +1,25 @@ +{ + "architectures": [ + "LlamaForCausalLM" + ], + "bos_token_id": 1, + "eos_token_id": 2, + "hidden_act": "silu", + "hidden_size": 5120, + "initializer_range": 0.02, + "intermediate_size": 13824, + "max_position_embeddings": 16384, + "model_type": "llama", + "num_attention_heads": 40, + "num_hidden_layers": 40, + "num_key_value_heads": 40, + "pretraining_tp": 1, + "rms_norm_eps": 1e-05, + "rope_scaling": null, + "rope_theta": 1000000, + "tie_word_embeddings": false, + "torch_dtype": "bfloat16", + "transformers_version": "4.32.0.dev0", + "use_cache": true, + "vocab_size": 32016 +} diff --git a/configuration.json b/configuration.json new file mode 100644 index 0000000..bbeeda1 --- /dev/null +++ b/configuration.json @@ -0,0 +1 @@ +{"framework": "pytorch", "task": "text-generation", "allow_remote": true} \ No newline at end of file