初始化项目,由ModelHub XC社区提供模型
Model: Snaseem2026/bestie-genz-qwen2.5-1.5b-lora-gguf Source: Original Platform
This commit is contained in:
40
.gitattributes
vendored
Normal file
40
.gitattributes
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
*.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
|
||||
bestie-lora.gguf filter=lfs diff=lfs merge=lfs -text
|
||||
qwen2.5-1.5b-instruct-q4_k_m.gguf filter=lfs diff=lfs merge=lfs -text
|
||||
qwen2.5-1.5b-instruct-f16.gguf filter=lfs diff=lfs merge=lfs -text
|
||||
peft-adapter/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
||||
bestie-merged-q4_k_m.gguf filter=lfs diff=lfs merge=lfs -text
|
||||
154
README.md
Normal file
154
README.md
Normal file
@@ -0,0 +1,154 @@
|
||||
---
|
||||
license: apache-2.0
|
||||
base_model: Qwen/Qwen2.5-1.5B-Instruct
|
||||
tags:
|
||||
- gen-z
|
||||
- persona
|
||||
- lora
|
||||
- gguf
|
||||
- llama.cpp
|
||||
language:
|
||||
- en
|
||||
pipeline_tag: text-generation
|
||||
---
|
||||
|
||||
# bestie-genz-qwen2.5-1.5b-lora-gguf 🫶 — a Gen Z persona LLM
|
||||
|
||||
**bestie-genz-qwen2.5-1.5b-lora-gguf** is a small, local chat model that answers normal questions *correctly*
|
||||
but talks like your chronically-online Gen Z best friend. It's
|
||||
[Qwen2.5-1.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-1.5B-Instruct) with a
|
||||
lightweight LoRA adapter that reshapes **tone**, not facts.
|
||||
|
||||
Built to run fully offline on a MacBook Air M2 (16GB) via
|
||||
[llama.cpp](https://github.com/ggml-org/llama.cpp) with Metal acceleration.
|
||||
|
||||
> ⚠️ **Slang snapshot:** This model reflects Gen Z slang and tone **as of 2026**.
|
||||
> Internet language moves fast — some phrasing will feel dated over time. This is
|
||||
> a point-in-time snapshot, not a living style guide.
|
||||
|
||||
---
|
||||
|
||||
## What's in this repo
|
||||
|
||||
| File | What it is | Size |
|
||||
|------|-----------|------|
|
||||
| `bestie-merged-q4_k_m.gguf` | Single-file merged model (base + bestie persona), easiest for LM Studio | ~940 MB |
|
||||
| `qwen2.5-1.5b-instruct-q4_k_m.gguf` | Base model, quantized to Q4_K_M | ~986 MB |
|
||||
| `bestie-lora.gguf` | The Gen Z LoRA adapter (kept **separate**, applied at runtime) | ~35 MB |
|
||||
| `qwen2.5-1.5b-instruct-f16.gguf` | Full-precision base GGUF (optional) | ~2.9 GB |
|
||||
|
||||
The LoRA is intentionally **not merged** into the base weights. llama.cpp applies
|
||||
it at inference time via `--lora`, so you can toggle the persona on/off with the
|
||||
same base model.
|
||||
|
||||
---
|
||||
|
||||
## Base model & why
|
||||
|
||||
- **Base:** `Qwen2.5-1.5B-Instruct` (Apache-2.0)
|
||||
- **Why:** Best-in-class reasoning/factuality for a sub-2B model, permissive
|
||||
license for redistribution, first-class llama.cpp conversion support, and small
|
||||
enough to LoRA-fine-tune and run on 16GB unified memory.
|
||||
|
||||
---
|
||||
|
||||
## Quick start (llama.cpp)
|
||||
|
||||
**Single merged model (no adapter needed):**
|
||||
|
||||
```bash
|
||||
llama-cli \
|
||||
-m bestie-merged-q4_k_m.gguf \
|
||||
-st -n 200 --temp 0.7 \
|
||||
-p "Why is the sky blue?"
|
||||
```
|
||||
|
||||
**CLI (single response):**
|
||||
|
||||
```bash
|
||||
llama-cli \
|
||||
-m qwen2.5-1.5b-instruct-q4_k_m.gguf \
|
||||
--lora bestie-lora.gguf \
|
||||
-st -n 200 --temp 0.7 \
|
||||
-p "Why is the sky blue?"
|
||||
```
|
||||
|
||||
**Server (OpenAI-compatible API):**
|
||||
|
||||
```bash
|
||||
llama-server \
|
||||
-m qwen2.5-1.5b-instruct-q4_k_m.gguf \
|
||||
--lora bestie-lora.gguf \
|
||||
--host 127.0.0.1 --port 8080 -c 2048 --alias bestie
|
||||
```
|
||||
|
||||
```bash
|
||||
curl -s http://127.0.0.1:8080/v1/chat/completions \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"model":"bestie","messages":[{"role":"user","content":"How do I stay motivated to work out?"}]}'
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Example outputs (base vs. bestie)
|
||||
|
||||
**Prompt:** *Why is the sky blue?*
|
||||
|
||||
- **Base:** "The sky appears blue because of a phenomenon called Rayleigh
|
||||
scattering. This happens when light from the sun travels through the Earth's
|
||||
atmosphere and is scattered..."
|
||||
- **bestie:** "Bet, quick breakdown: Sunlight splits into colors, blue gets
|
||||
scattered more. No fluff, just signal."
|
||||
|
||||
**Prompt:** *Explain what a black hole is.*
|
||||
|
||||
- **Base:** "A black hole is a region of spacetime where gravity is so strong that
|
||||
nothing, not even light, can escape from it..."
|
||||
- **bestie:** "Real talk, no BS: A black hole is a region of spacetime with such
|
||||
strong gravitational pull that nothing, not even light, can escape from it."
|
||||
|
||||
**Prompt:** *How do I stay motivated to work out?*
|
||||
|
||||
- **bestie:** "Real talk, no BS: Break your workout into manageable 30-minute
|
||||
sessions, track your progress, and always focus on form over intensity. Progress
|
||||
over perfection, always."
|
||||
|
||||
---
|
||||
|
||||
## Intended use
|
||||
|
||||
- Casual Q&A, study help, explanations, and everyday assistance with a fun,
|
||||
informal Gen Z voice.
|
||||
- Great for demos, personal projects, and learning the LoRA → GGUF → llama.cpp
|
||||
pipeline.
|
||||
|
||||
### Out of scope / limitations
|
||||
|
||||
- **Small model (1.5B):** can hallucinate or oversimplify. Verify anything
|
||||
important.
|
||||
- **Persona artifacts:** trained on a small (~165-example) dataset, so it
|
||||
occasionally over-uses signature phrases ("real talk, no BS", "drop your
|
||||
context") or leaks a stray token. Larger/cleaner data would smooth this out.
|
||||
- **English only**, informal register — not suitable for formal/professional
|
||||
writing.
|
||||
- **Not safety-tuned** beyond the base model's alignment.
|
||||
|
||||
---
|
||||
|
||||
## Training details
|
||||
|
||||
- **Method:** LoRA (PEFT) — the *only* step done in `transformers`/`peft`, since
|
||||
llama.cpp is inference-only and can't train.
|
||||
- **Everything else via llama.cpp:** GGUF conversion (`convert_hf_to_gguf.py`),
|
||||
LoRA→GGUF export (`convert_lora_to_gguf.py`), quantization (`llama-quantize`),
|
||||
inference (`llama-cli`), and serving (`llama-server`).
|
||||
- **Data:** ~165 hand-written (prompt, response) pairs — normal questions answered
|
||||
correctly in an authentic Gen Z voice — plus ~20 validation examples.
|
||||
- **Hyperparameters:** low rank (small-dataset appropriate), few epochs, tuned for
|
||||
16GB unified memory on Apple Silicon (MPS).
|
||||
|
||||
---
|
||||
|
||||
## License
|
||||
|
||||
Apache-2.0, inherited from the Qwen2.5-1.5B-Instruct base model.
|
||||
3
bestie-lora.gguf
Normal file
3
bestie-lora.gguf
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4ecf28523a2716bc042b235d21a90fa53c4ca5632e4241e10a5d534853808766
|
||||
size 36956864
|
||||
3
bestie-merged-q4_k_m.gguf
Normal file
3
bestie-merged-q4_k_m.gguf
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a59f6a4f8e9d65a7078b4027ab2ea4c3cff9701614b12738f09a19ef69c56814
|
||||
size 986048608
|
||||
50
peft-adapter/adapter_config.json
Normal file
50
peft-adapter/adapter_config.json
Normal file
@@ -0,0 +1,50 @@
|
||||
{
|
||||
"alora_invocation_tokens": null,
|
||||
"alpha_pattern": {},
|
||||
"arrow_config": null,
|
||||
"auto_mapping": null,
|
||||
"base_model_name_or_path": "Qwen/Qwen2.5-1.5B-Instruct",
|
||||
"bias": "none",
|
||||
"corda_config": null,
|
||||
"ensure_weight_tying": false,
|
||||
"eva_config": null,
|
||||
"exclude_modules": null,
|
||||
"fan_in_fan_out": false,
|
||||
"inference_mode": true,
|
||||
"init_lora_weights": true,
|
||||
"layer_replication": null,
|
||||
"layers_pattern": null,
|
||||
"layers_to_transform": null,
|
||||
"loftq_config": {},
|
||||
"lora_alpha": 16,
|
||||
"lora_bias": false,
|
||||
"lora_dropout": 0.05,
|
||||
"lora_ga_config": null,
|
||||
"megatron_config": null,
|
||||
"megatron_core": "megatron.core",
|
||||
"modules_to_save": null,
|
||||
"monteclora_config": null,
|
||||
"peft_type": "LORA",
|
||||
"peft_version": "0.20.0",
|
||||
"qalora_group_size": 16,
|
||||
"r": 8,
|
||||
"rank_pattern": {},
|
||||
"revision": null,
|
||||
"target_modules": [
|
||||
"k_proj",
|
||||
"down_proj",
|
||||
"o_proj",
|
||||
"up_proj",
|
||||
"q_proj",
|
||||
"v_proj",
|
||||
"gate_proj"
|
||||
],
|
||||
"target_parameters": null,
|
||||
"task_type": "CAUSAL_LM",
|
||||
"trainable_token_indices": null,
|
||||
"use_bdlora": null,
|
||||
"use_dora": false,
|
||||
"use_qalora": false,
|
||||
"use_rslora": false,
|
||||
"velora_config": null
|
||||
}
|
||||
3
peft-adapter/adapter_model.safetensors
Normal file
3
peft-adapter/adapter_model.safetensors
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5e2cc0067a374f15253c7e44b4eaa5516a2c58c7566a8b7953c092df68a8c011
|
||||
size 36981072
|
||||
54
peft-adapter/chat_template.jinja
Normal file
54
peft-adapter/chat_template.jinja
Normal file
@@ -0,0 +1,54 @@
|
||||
{%- if tools %}
|
||||
{{- '<|im_start|>system\n' }}
|
||||
{%- if messages[0]['role'] == 'system' %}
|
||||
{{- messages[0]['content'] }}
|
||||
{%- else %}
|
||||
{{- 'You are Qwen, created by Alibaba Cloud. You are a helpful assistant.' }}
|
||||
{%- endif %}
|
||||
{{- "\n\n# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
|
||||
{%- for tool in tools %}
|
||||
{{- "\n" }}
|
||||
{{- tool | tojson }}
|
||||
{%- endfor %}
|
||||
{{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}
|
||||
{%- else %}
|
||||
{%- if messages[0]['role'] == 'system' %}
|
||||
{{- '<|im_start|>system\n' + messages[0]['content'] + '<|im_end|>\n' }}
|
||||
{%- else %}
|
||||
{{- '<|im_start|>system\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\n' }}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- for message in messages %}
|
||||
{%- if (message.role == "user") or (message.role == "system" and not loop.first) or (message.role == "assistant" and not message.tool_calls) %}
|
||||
{{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>' + '\n' }}
|
||||
{%- elif message.role == "assistant" %}
|
||||
{{- '<|im_start|>' + message.role }}
|
||||
{%- if message.content %}
|
||||
{{- '\n' + message.content }}
|
||||
{%- endif %}
|
||||
{%- for tool_call in message.tool_calls %}
|
||||
{%- if tool_call.function is defined %}
|
||||
{%- set tool_call = tool_call.function %}
|
||||
{%- endif %}
|
||||
{{- '\n<tool_call>\n{"name": "' }}
|
||||
{{- tool_call.name }}
|
||||
{{- '", "arguments": ' }}
|
||||
{{- tool_call.arguments | tojson }}
|
||||
{{- '}\n</tool_call>' }}
|
||||
{%- endfor %}
|
||||
{{- '<|im_end|>\n' }}
|
||||
{%- elif message.role == "tool" %}
|
||||
{%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != "tool") %}
|
||||
{{- '<|im_start|>user' }}
|
||||
{%- endif %}
|
||||
{{- '\n<tool_response>\n' }}
|
||||
{{- message.content }}
|
||||
{{- '\n</tool_response>' }}
|
||||
{%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
|
||||
{{- '<|im_end|>\n' }}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- if add_generation_prompt %}
|
||||
{{- '<|im_start|>assistant\n' }}
|
||||
{%- endif %}
|
||||
3
peft-adapter/tokenizer.json
Normal file
3
peft-adapter/tokenizer.json
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d429fe753aea0ff87a94e86396d5508abb0d1d0e1f7a0d47c787ff72e0bf2691
|
||||
size 11422170
|
||||
30
peft-adapter/tokenizer_config.json
Normal file
30
peft-adapter/tokenizer_config.json
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"add_prefix_space": false,
|
||||
"backend": "tokenizers",
|
||||
"bos_token": null,
|
||||
"clean_up_tokenization_spaces": false,
|
||||
"eos_token": "<|im_end|>",
|
||||
"errors": "replace",
|
||||
"extra_special_tokens": [
|
||||
"<|im_start|>",
|
||||
"<|im_end|>",
|
||||
"<|object_ref_start|>",
|
||||
"<|object_ref_end|>",
|
||||
"<|box_start|>",
|
||||
"<|box_end|>",
|
||||
"<|quad_start|>",
|
||||
"<|quad_end|>",
|
||||
"<|vision_start|>",
|
||||
"<|vision_end|>",
|
||||
"<|vision_pad|>",
|
||||
"<|image_pad|>",
|
||||
"<|video_pad|>"
|
||||
],
|
||||
"is_local": false,
|
||||
"local_files_only": false,
|
||||
"model_max_length": 131072,
|
||||
"pad_token": "<|endoftext|>",
|
||||
"split_special_tokens": false,
|
||||
"tokenizer_class": "Qwen2Tokenizer",
|
||||
"unk_token": null
|
||||
}
|
||||
3
qwen2.5-1.5b-instruct-f16.gguf
Normal file
3
qwen2.5-1.5b-instruct-f16.gguf
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:390b782152e75c7fc68aa9edb2f86191ae09f5b056f291a2529ca512c9f36361
|
||||
size 3093669472
|
||||
3
qwen2.5-1.5b-instruct-q4_k_m.gguf
Normal file
3
qwen2.5-1.5b-instruct-q4_k_m.gguf
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f791d09f218fd50263a6a9c9ed1ef80117ab7678afe6b73dcbaccf789207d222
|
||||
size 986048608
|
||||
Reference in New Issue
Block a user