brimtown commited on
Commit
4ec72e3
·
verified ·
1 Parent(s): 04dcdbd

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +113 -0
README.md ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: apache-2.0
5
+ library_name: mlc-llm
6
+ base_model: unsloth/Qwen2.5-0.5B-Instruct
7
+ tags:
8
+ - conversational
9
+ - chat
10
+ - fine-tuned
11
+ - mlc
12
+ - webllm
13
+ - quantized
14
+ - q4f16_1
15
+ pipeline_tag: text-generation
16
+ ---
17
+
18
+ # Groupchat Model - Qwen2.5 0.5B Fine-tuned
19
+
20
+ A fine-tuned Qwen2.5-0.5B model trained to mimic individual users in a group chat, converted to MLC format for browser deployment via WebLLM.
21
+
22
+ ## Model Details
23
+
24
+ - **Base Model**: [Qwen2.5-0.5B](https://huggingface.co/Qwen/Qwen2.5-0.5B-Instruct)
25
+ - **Fine-tuning Method**: Unsloth
26
+ - **Quantization**: q4f16_1 (4-bit weights, float16 activations)
27
+ - **Format**: MLC-LLM for WebLLM deployment
28
+
29
+ ## Dataset
30
+
31
+ - **Source**: Private GroupMe group chat
32
+ - **Size**: ~60,000 messages
33
+ - **Time Period**: 2013-2016
34
+ - **Participants**: 10 users with varying activity levels
35
+
36
+ ## Prompt Format
37
+
38
+ The model was fine-tuned using the ChatML format with the following structure:
39
+
40
+ ```
41
+ You are mimicking users in a group chat. Given the conversation history, respond as the specified user.
42
+
43
+ Recent messages:
44
+ [Speaker1]: [Message1]
45
+ [Speaker2]: [Message2]
46
+ ...
47
+
48
+ Respond as [TargetSpeaker]:
49
+ ```
50
+
51
+ ### Example Usage
52
+
53
+ ```javascript
54
+ const prompt = `You are mimicking users in a group chat. Given the conversation history, respond as the specified user.
55
+
56
+ Recent messages:
57
+ Jackson: what's in a bento box
58
+ Jackson: That's like a pupu platter right
59
+ Nick: What's a pupu platter
60
+
61
+ Respond as Spencer:`;
62
+ ```
63
+
64
+ ## Recommended Generation Parameters
65
+
66
+ For best results, use these settings:
67
+
68
+ ```javascript
69
+ {
70
+ temperature: 0.8,
71
+ top_p: 0.9,
72
+ max_tokens: 32-64,
73
+ }
74
+ ```
75
+
76
+ ## WebLLM Integration
77
+
78
+ This model is optimized for browser deployment using [WebLLM](https://github.com/mlc-ai/web-llm).
79
+
80
+ ### Loading in WebLLM
81
+
82
+ ```javascript
83
+ import * as webllm from "@mlc-ai/web-llm";
84
+
85
+ const appConfig = webllm.prebuiltAppConfig;
86
+
87
+ // Borrow model_lib from native Qwen2.5-0.5B
88
+ const qwenLib = appConfig.model_list.find(m => m.model_id === "Qwen2.5-0.5B-Instruct-q4f16_1-MLC");
89
+
90
+ appConfig.model_list.push({
91
+ ...qwenLib,
92
+ model_id: "Groupchat-Qwen2.5-0.5B-q4f16_1",
93
+ model: "https://huggingface.co/brimtown/Groupchat-Qwen2.5-0.5B-MLC",
94
+ low_resource_required: true,
95
+ overrides: {
96
+ context_window_size: 512
97
+ }
98
+ });
99
+
100
+ const engine = await webllm.CreateMLCEngine("Groupchat-Qwen2.5-0.5B-q4f16_1", {
101
+ appConfig: appConfig
102
+ });
103
+ ```
104
+
105
+ ## License
106
+
107
+ This model is released under the same license as the base Qwen2.5 model. The training data is private and not included.
108
+
109
+ ## Acknowledgments
110
+
111
+ - Fine-tuned using [Unsloth](https://github.com/unslothai/unsloth)
112
+ - Converted to MLC format using [MLC-LLM](https://github.com/mlc-ai/mlc-llm)
113
+ - Deployed with [WebLLM](https://github.com/mlc-ai/web-llm)