From 1aacf1ef84d9cb183478d35dc7cd3885c7a5f4f2 Mon Sep 17 00:00:00 2001 From: ModelHub XC Date: Tue, 11 Aug 2026 02:31:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=EF=BC=8C=E7=94=B1ModelHub=20XC=E7=A4=BE=E5=8C=BA=E6=8F=90?= =?UTF-8?q?=E4=BE=9B=E6=A8=A1=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Model: berrybytesllc/llama-3.1-security-finetune Source: Original Platform --- .gitattributes | 39 +++++++++++++++++++++ Llama-3.2-1B-Instruct.F16.gguf | 3 ++ Llama-3.2-1B-Instruct.Q4_K_M.gguf | 3 ++ Llama-3.2-1B-Instruct.Q5_K_M.gguf | 3 ++ Llama-3.2-1B-Instruct.Q8_0.gguf | 3 ++ Modelfile | 57 +++++++++++++++++++++++++++++++ README.md | 25 ++++++++++++++ config.json | 38 +++++++++++++++++++++ 8 files changed, 171 insertions(+) create mode 100644 .gitattributes create mode 100644 Llama-3.2-1B-Instruct.F16.gguf create mode 100644 Llama-3.2-1B-Instruct.Q4_K_M.gguf create mode 100644 Llama-3.2-1B-Instruct.Q5_K_M.gguf create mode 100644 Llama-3.2-1B-Instruct.Q8_0.gguf create mode 100644 Modelfile create mode 100644 README.md create mode 100644 config.json diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..d2629bc --- /dev/null +++ b/.gitattributes @@ -0,0 +1,39 @@ +*.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 +Llama-3.2-1B-Instruct.Q8_0.gguf filter=lfs diff=lfs merge=lfs -text +Llama-3.2-1B-Instruct.F16.gguf filter=lfs diff=lfs merge=lfs -text +Llama-3.2-1B-Instruct.Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text +Llama-3.2-1B-Instruct.Q5_K_M.gguf filter=lfs diff=lfs merge=lfs -text diff --git a/Llama-3.2-1B-Instruct.F16.gguf b/Llama-3.2-1B-Instruct.F16.gguf new file mode 100644 index 0000000..3083869 --- /dev/null +++ b/Llama-3.2-1B-Instruct.F16.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:82e77e51a12c69a2421bf2c1466f9f658e57881be168f702da4958afe4fe8a97 +size 2479596032 diff --git a/Llama-3.2-1B-Instruct.Q4_K_M.gguf b/Llama-3.2-1B-Instruct.Q4_K_M.gguf new file mode 100644 index 0000000..7e1b32b --- /dev/null +++ b/Llama-3.2-1B-Instruct.Q4_K_M.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f1171d9704b18cbaa4b1de15049e2ce962798e30f2dff432beade4efd0d5130e +size 807694848 diff --git a/Llama-3.2-1B-Instruct.Q5_K_M.gguf b/Llama-3.2-1B-Instruct.Q5_K_M.gguf new file mode 100644 index 0000000..2103c25 --- /dev/null +++ b/Llama-3.2-1B-Instruct.Q5_K_M.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c19bf6e7f1284c09b14f44c182f9c806b447c49d6bea8458351f66de4010d2f3 +size 911503872 diff --git a/Llama-3.2-1B-Instruct.Q8_0.gguf b/Llama-3.2-1B-Instruct.Q8_0.gguf new file mode 100644 index 0000000..a5136a7 --- /dev/null +++ b/Llama-3.2-1B-Instruct.Q8_0.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ab45eda194fb54e168210a651b13470a39719f851dfa82ac857822d8d7e9d7c0 +size 1321083392 diff --git a/Modelfile b/Modelfile new file mode 100644 index 0000000..ec74ebf --- /dev/null +++ b/Modelfile @@ -0,0 +1,57 @@ + +FROM Llama-3.2-1B-Instruct.Q5_K_M.gguf +TEMPLATE """{{ if .Messages }} +{{- if or .System .Tools }}<|start_header_id|>system<|end_header_id|> +{{- if .System }} + +{{ .System }} +{{- end }} +{{- if .Tools }} + +You are a helpful assistant with tool calling capabilities. When you receive a tool call response, use the output to format an answer to the original use question. +{{- end }} +{{- end }}<|eot_id|> +{{- range $i, $_ := .Messages }} +{{- $last := eq (len (slice $.Messages $i)) 1 }} +{{- if eq .Role "user" }}<|start_header_id|>user<|end_header_id|> +{{- if and $.Tools $last }} + +Given the following functions, please respond with a JSON for a function call with its proper arguments that best answers the given prompt. + +Respond in the format {"name": function name, "parameters": dictionary of argument name and its value}. Do not use variables. + +{{ $.Tools }} +{{- end }} + +{{ .Content }}<|eot_id|>{{ if $last }}<|start_header_id|>assistant<|end_header_id|> + +{{ end }} +{{- else if eq .Role "assistant" }}<|start_header_id|>assistant<|end_header_id|> +{{- if .ToolCalls }} + +{{- range .ToolCalls }}{"name": "{{ .Function.Name }}", "parameters": {{ .Function.Arguments }}}{{ end }} +{{- else }} + +{{ .Content }}{{ if not $last }}<|eot_id|>{{ end }} +{{- end }} +{{- else if eq .Role "tool" }}<|start_header_id|>ipython<|end_header_id|> + +{{ .Content }}<|eot_id|>{{ if $last }}<|start_header_id|>assistant<|end_header_id|> + +{{ end }} +{{- end }} +{{- end }} +{{- else }} +{{- if .System }}<|start_header_id|>system<|end_header_id|> + +{{ .System }}<|eot_id|>{{ end }}{{ if .Prompt }}<|start_header_id|>user<|end_header_id|> + +{{ .Prompt }}<|eot_id|>{{ end }}<|start_header_id|>assistant<|end_header_id|> + +{{ end }}{{ .Response }}{{ if .Response }}<|eot_id|>{{ end }}""" +PARAMETER stop "<|start_header_id|>" +PARAMETER stop "<|end_header_id|>" +PARAMETER stop "<|eot_id|>" +PARAMETER stop "<|eom_id|>" +PARAMETER temperature 1.5 +PARAMETER min_p 0.1 \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..68270a4 --- /dev/null +++ b/README.md @@ -0,0 +1,25 @@ +--- +tags: +- gguf +- llama.cpp +- unsloth + +--- + +# llama-3.1-security-finetune : GGUF + +This model was finetuned and converted to GGUF format using [Unsloth](https://github.com/unslothai/unsloth). + +**Example usage**: +- For text only LLMs: `./llama.cpp/llama-cli -hf berrybytesllc/llama-3.1-security-finetune --jinja` +- For multimodal models: `./llama.cpp/llama-mtmd-cli -hf berrybytesllc/llama-3.1-security-finetune --jinja` + +## Available Model files: +- `Llama-3.2-1B-Instruct.Q5_K_M.gguf` +- `Llama-3.2-1B-Instruct.Q8_0.gguf` +- `Llama-3.2-1B-Instruct.Q4_K_M.gguf` + +## Ollama +An Ollama Modelfile is included for easy deployment. +This was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth) +[](https://github.com/unslothai/unsloth) diff --git a/config.json b/config.json new file mode 100644 index 0000000..17584a8 --- /dev/null +++ b/config.json @@ -0,0 +1,38 @@ +{ + "architectures": [ + "LlamaForCausalLM" + ], + "attention_bias": false, + "attention_dropout": 0.0, + "bos_token_id": 128000, + "torch_dtype": "float16", + "eos_token_id": 128009, + "head_dim": 64, + "hidden_act": "silu", + "hidden_size": 2048, + "initializer_range": 0.02, + "intermediate_size": 8192, + "max_position_embeddings": 131072, + "mlp_bias": false, + "model_type": "llama", + "num_attention_heads": 32, + "num_hidden_layers": 16, + "num_key_value_heads": 8, + "pad_token_id": 128004, + "pretraining_tp": 1, + "rms_norm_eps": 1e-05, + "rope_scaling": { + "factor": 32.0, + "high_freq_factor": 4.0, + "low_freq_factor": 1.0, + "original_max_position_embeddings": 8192, + "rope_type": "llama3" + }, + "rope_theta": 500000.0, + "tie_word_embeddings": true, + "transformers_version": "4.56.2", + "unsloth_fixed": true, + "unsloth_version": "2026.1.2", + "use_cache": true, + "vocab_size": 128256 +} \ No newline at end of file