aaravriyer193 commited on
Commit
a4b4053
·
verified ·
1 Parent(s): 848177b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +112 -160
README.md CHANGED
@@ -1,199 +1,151 @@
1
  ---
2
  library_name: transformers
3
- tags: []
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  ---
 
5
 
6
- # Model Card for Model ID
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
 
8
- <!-- Provide a quick summary of what the model is/does. -->
9
 
 
10
 
 
11
 
12
- ## Model Details
13
 
14
- ### Model Description
15
 
16
- <!-- Provide a longer summary of what this model is. -->
17
 
18
- This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
19
 
20
- - **Developed by:** [More Information Needed]
21
- - **Funded by [optional]:** [More Information Needed]
22
- - **Shared by [optional]:** [More Information Needed]
23
- - **Model type:** [More Information Needed]
24
- - **Language(s) (NLP):** [More Information Needed]
25
- - **License:** [More Information Needed]
26
- - **Finetuned from model [optional]:** [More Information Needed]
27
 
28
- ### Model Sources [optional]
 
 
 
29
 
30
- <!-- Provide the basic links for the model. -->
31
 
32
- - **Repository:** [More Information Needed]
33
- - **Paper [optional]:** [More Information Needed]
34
- - **Demo [optional]:** [More Information Needed]
35
 
36
- ## Uses
37
 
38
- <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
39
 
40
- ### Direct Use
 
 
41
 
42
- <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
43
 
44
- [More Information Needed]
 
 
45
 
46
- ### Downstream Use [optional]
 
47
 
48
- <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
 
49
 
50
- [More Information Needed]
 
 
 
 
 
 
51
 
52
- ### Out-of-Scope Use
 
 
 
 
 
 
 
 
53
 
54
- <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
 
 
55
 
56
- [More Information Needed]
57
 
58
- ## Bias, Risks, and Limitations
 
 
 
 
 
 
 
 
59
 
60
- <!-- This section is meant to convey both technical and sociotechnical limitations. -->
 
 
61
 
62
- [More Information Needed]
63
 
64
- ### Recommendations
65
 
66
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
67
 
68
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
 
 
 
 
 
 
69
 
70
- ## How to Get Started with the Model
71
 
72
- Use the code below to get started with the model.
73
 
74
- [More Information Needed]
75
 
76
- ## Training Details
77
 
78
- ### Training Data
 
79
 
80
- <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
81
 
82
- [More Information Needed]
83
-
84
- ### Training Procedure
85
-
86
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
87
-
88
- #### Preprocessing [optional]
89
-
90
- [More Information Needed]
91
-
92
-
93
- #### Training Hyperparameters
94
-
95
- - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
96
-
97
- #### Speeds, Sizes, Times [optional]
98
-
99
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
100
-
101
- [More Information Needed]
102
-
103
- ## Evaluation
104
-
105
- <!-- This section describes the evaluation protocols and provides the results. -->
106
-
107
- ### Testing Data, Factors & Metrics
108
-
109
- #### Testing Data
110
-
111
- <!-- This should link to a Dataset Card if possible. -->
112
-
113
- [More Information Needed]
114
-
115
- #### Factors
116
-
117
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
118
-
119
- [More Information Needed]
120
-
121
- #### Metrics
122
-
123
- <!-- These are the evaluation metrics being used, ideally with a description of why. -->
124
-
125
- [More Information Needed]
126
-
127
- ### Results
128
-
129
- [More Information Needed]
130
-
131
- #### Summary
132
-
133
-
134
-
135
- ## Model Examination [optional]
136
-
137
- <!-- Relevant interpretability work for the model goes here -->
138
-
139
- [More Information Needed]
140
-
141
- ## Environmental Impact
142
-
143
- <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
144
-
145
- Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
146
-
147
- - **Hardware Type:** [More Information Needed]
148
- - **Hours used:** [More Information Needed]
149
- - **Cloud Provider:** [More Information Needed]
150
- - **Compute Region:** [More Information Needed]
151
- - **Carbon Emitted:** [More Information Needed]
152
-
153
- ## Technical Specifications [optional]
154
-
155
- ### Model Architecture and Objective
156
-
157
- [More Information Needed]
158
-
159
- ### Compute Infrastructure
160
-
161
- [More Information Needed]
162
-
163
- #### Hardware
164
-
165
- [More Information Needed]
166
-
167
- #### Software
168
-
169
- [More Information Needed]
170
-
171
- ## Citation [optional]
172
-
173
- <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
174
-
175
- **BibTeX:**
176
-
177
- [More Information Needed]
178
-
179
- **APA:**
180
-
181
- [More Information Needed]
182
-
183
- ## Glossary [optional]
184
-
185
- <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
186
-
187
- [More Information Needed]
188
-
189
- ## More Information [optional]
190
-
191
- [More Information Needed]
192
-
193
- ## Model Card Authors [optional]
194
-
195
- [More Information Needed]
196
-
197
- ## Model Card Contact
198
-
199
- [More Information Needed]
 
1
  ---
2
  library_name: transformers
3
+ tags:
4
+ - code
5
+ - agent
6
+ - agentic
7
+ - highperformance
8
+ - moe
9
+ - mixtureofexperts
10
+ - glm4.7
11
+ - fast
12
+ - reasoning
13
+ license: mit
14
+ datasets:
15
+ - aaravriyer193/Chimp-GPT-Code-Refined-12k
16
+ language:
17
+ - en
18
+ base_model:
19
+ - zai-org/GLM-4.7-Flash
20
  ---
21
+ #
22
 
23
+ ```text
24
+ =============================================================================
25
+ ____ _ _ ____ ____ _____ ____ _
26
+ / ___| |__ (_)_ __ ___ _ __ / ___| _ \_ _| / ___|___ __| | ___ _ __
27
+ | | | '_ \| | '_ ` _ \| '_ \ | _| |_) || | | | / _ \ / _` |/ _ \ '__|
28
+ | |___| | | | | | | | | | |_) | |_| | __/| | | |__| (_) | (_| | __/ |
29
+ \____|_| |_|_|_| |_| |_| .__/ \____|_| |_| \____\___/ \__,_|\___|_|
30
+ |_|
31
+ _____ _ _ _
32
+ | ____| (_) |_ ___
33
+ | _| | | | __/ _ \
34
+ | |___| | | || __/
35
+ |_____|_|_|\__\___|
36
+ =============================================================================
37
+ ````
38
 
39
+ \<div align="center"\>
40
 
41
+ *Provide concise, bug-free, and high-performance code.*
42
 
43
+ \</div\>
44
 
45
+ -----
46
 
47
+ ## 🦍 Overview
48
 
49
+ **ChimpGPT-Coder-Elite** is a state-of-the-art, fine-tuned programming assistant built on the massive 30B parameter GLM-4.7-Flash Mixture-of-Experts (MoE) architecture.
50
 
51
+ It has been rigorously trained on a highly refined, 12,000-sample dataset (`Chimp-GPT-Code-Refined-12k`) to eradicate conversational boilerplate, hallucinated syntax, and context-loss. It does one thing, and it does it with lethal precision: **it writes elite-level code.**
52
 
53
+ ### Key Features
 
 
 
 
 
 
54
 
55
+ * **Zero-Shot Alignment:** Hard-wired to bypass chatbot pleasantries and deliver structural code immediately.
56
+ * **16k Context Window:** Flawlessly handles long-range file refactoring without losing variable logic.
57
+ * **MoE Routing Mastery:** Hyper-optimized expert routing for logic-dense languages (Python, Rust, TS, C++).
58
+ * **VRAM Efficient:** Fully merged weights optimized for blazing-fast 4-bit inference on NVIDIA L4 (24GB) and A100 GPUs.
59
 
60
+ -----
61
 
62
+ ## 🚀 Quickstart (Inference)
 
 
63
 
64
+ ChimpGPT-Coder-Elite is merged and ready for immediate deployment. You do not need `peft` to run this model.
65
 
66
+ ### Prerequisites
67
 
68
+ ```bash
69
+ pip install torch transformers accelerate bitsandbytes
70
+ ```
71
 
72
+ ### Python CLI Snippet (L4 / A100 Optimized)
73
 
74
+ ```python
75
+ import torch
76
+ from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
77
 
78
+ MODEL_ID = "aaravriyer193/chimpgpt-coder-elite"
79
+ SYSTEM_PROMPT = "You are Coder-Elite, a world-class programming assistant. Provide concise, bug-free, and high-performance code."
80
 
81
+ # 1. Load Tokenizer
82
+ tokenizer = AutoTokenizer.from_pretrained(MODEL_ID, trust_remote_code=True)
83
 
84
+ # 2. Strict 4-bit Configuration
85
+ bnb_config = BitsAndBytesConfig(
86
+ load_in_4bit=True,
87
+ bnb_4bit_use_double_quant=True,
88
+ bnb_4bit_quant_type="nf4",
89
+ bnb_4bit_compute_dtype=torch.bfloat16
90
+ )
91
 
92
+ # 3. Load Model (Direct to VRAM)
93
+ model = AutoModelForCausalLM.from_pretrained(
94
+ MODEL_ID,
95
+ quantization_config=bnb_config,
96
+ device_map={"": 0}, # Bypasses CPU offload errors
97
+ trust_remote_code=True,
98
+ attn_implementation="sdpa"
99
+ )
100
+ model.eval()
101
 
102
+ # 4. Generate
103
+ user_input = "Write a high-performance FastAPI endpoint with background tasks."
104
+ prompt = f"<|system|>\n{SYSTEM_PROMPT}\n<|user|>\n{user_input}\n<|assistant|>\n"
105
 
106
+ inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
107
 
108
+ with torch.no_grad():
109
+ outputs = model.generate(
110
+ **inputs,
111
+ max_new_tokens=1024,
112
+ do_sample=True,
113
+ temperature=0.1, # Strict logic mode
114
+ top_p=0.9,
115
+ eos_token_id=tokenizer.eos_token_id
116
+ )
117
 
118
+ response = tokenizer.decode(outputs[0][len(inputs["input_ids"][0]):], skip_special_tokens=True)
119
+ print(response)
120
+ ```
121
 
122
+ -----
123
 
124
+ ## 🧠 Training Architecture
125
 
126
+ This model was trained using a custom hardware-aligned pipeline on an NVIDIA A100.
127
 
128
+ * **Method:** Low-Rank Adaptation (LoRA)
129
+ * **Rank (r):** 64
130
+ * **Alpha:** 128
131
+ * **Target Modules:** `all-linear`
132
+ * **Learning Rate:** 2e-4 (Cosine Scheduler)
133
+ * **Precision:** `bfloat16` with 4-bit quantized base weights during training.
134
+ * **Final Loss:** \< 0.60 (Targeting the structural "Goldilocks Zone" to prevent overfitting).
135
 
136
+ ### Dataset
137
 
138
+ Trained exclusively on [aaravriyer193/Chimp-GPT-Code-Refined-12k](https://www.google.com/search?q=https://huggingface.co/datasets/aaravriyer193/Chimp-GPT-Code-Refined-12k). The dataset was formatted using a strict `<|system|>`, `<|user|>`, `<|assistant|>` chat template to enforce structural discipline.
139
 
140
+ -----
141
 
142
+ ## ⚠️ Limitations & Hardware Requirements
143
 
144
+ * **VRAM Minimum:** Running this model requires at least **20GB of VRAM** (e.g., NVIDIA L4, RTX 3090, RTX 4090) when using 4-bit quantization.
145
+ * **Precision:** The model was explicitly merged in `bfloat16`. Attempting to load this in `float32` will result in massive Out-of-Memory (OOM) errors.
146
 
147
+ -----
148
 
149
+ \<div align="center"\>
150
+ \<i\>Trained with 🍌 by aaravriyer193\</i\>
151
+ \</div\>