shawaz03 commited on
Commit
b7070bf
·
verified ·
1 Parent(s): e4117ea

Update Model Card with 1-click Colab badge and 4-bit snippets

Browse files
Files changed (1) hide show
  1. README.md +20 -6
README.md CHANGED
@@ -23,6 +23,7 @@ library_name: transformers
23
 
24
  <div align="center">
25
 
 
26
  [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
27
  [![Base Model](https://img.shields.io/badge/Base%20Model-Qwen2.5--Coder--7B--Instruct-purple.svg)](https://huggingface.co/Qwen/Qwen2.5-Coder-7B-Instruct)
28
  [![Model Size](https://img.shields.io/badge/Parameters-7.61B-green.svg)]()
@@ -35,6 +36,14 @@ library_name: transformers
35
 
36
  ---
37
 
 
 
 
 
 
 
 
 
38
  ## 📌 Overview
39
 
40
  **Vibe Coder v2.0 MAX** is a specialized, fine-tuned code generation model based on `Qwen2.5-Coder-7B-Instruct`. It is engineered specifically to eliminate common LLM coding pitfalls—such as lazy placeholder comments (`// TODO: implement logic`), broken imports, and outdated visual tropes.
@@ -71,24 +80,29 @@ Vibe Coder was trained on a **64,000-record Master Dataset** structured in stric
71
 
72
  ## 💻 Quick Start & Usage
73
 
74
- ### 1. Using Transformers (Python)
75
 
76
  ```python
77
  import torch
78
- from transformers import AutoModelForCausalLM, AutoTokenizer
79
 
80
  model_id = "shawaz03/vibe-coder-7b-max"
81
 
82
- # Load Model & Tokenizer
 
 
 
 
 
 
83
  tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
84
  model = AutoModelForCausalLM.from_pretrained(
85
  model_id,
86
- torch_dtype=torch.float16,
87
  device_map="auto",
88
  trust_remote_code=True
89
  )
90
 
91
- # System Prompt
92
  system_prompt = """You are Vibe Coder, a world-class principal full-stack software engineer and UI/UX designer.
93
  Write complete, modern, production-grade code in TypeScript, React, Next.js, and Node.js with ZERO placeholders."""
94
 
@@ -103,7 +117,7 @@ inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
103
  outputs = model.generate(
104
  **inputs,
105
  max_new_tokens=2048,
106
- temperature=0.2, # 0.2 is recommended for precise code logic
107
  top_p=0.95,
108
  repetition_penalty=1.05,
109
  do_sample=True,
 
23
 
24
  <div align="center">
25
 
26
+ [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/shawaz03/LLM/blob/main/vibe_coder_quickstart.ipynb)
27
  [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
28
  [![Base Model](https://img.shields.io/badge/Base%20Model-Qwen2.5--Coder--7B--Instruct-purple.svg)](https://huggingface.co/Qwen/Qwen2.5-Coder-7B-Instruct)
29
  [![Model Size](https://img.shields.io/badge/Parameters-7.61B-green.svg)]()
 
36
 
37
  ---
38
 
39
+ ## ⚡ Quickstart on Google Colab (1-Click Run)
40
+
41
+ Run Vibe Coder on a **Free Google Colab T4 GPU** with zero memory warnings:
42
+
43
+ 👉 [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/shawaz03/LLM/blob/main/vibe_coder_quickstart.ipynb)
44
+
45
+ ---
46
+
47
  ## 📌 Overview
48
 
49
  **Vibe Coder v2.0 MAX** is a specialized, fine-tuned code generation model based on `Qwen2.5-Coder-7B-Instruct`. It is engineered specifically to eliminate common LLM coding pitfalls—such as lazy placeholder comments (`// TODO: implement logic`), broken imports, and outdated visual tropes.
 
80
 
81
  ## 💻 Quick Start & Usage
82
 
83
+ ### 1. Using Transformers in 4-bit (Google Colab / Low-VRAM GPUs)
84
 
85
  ```python
86
  import torch
87
+ from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
88
 
89
  model_id = "shawaz03/vibe-coder-7b-max"
90
 
91
+ bnb_config = BitsAndBytesConfig(
92
+ load_in_4bit=True,
93
+ bnb_4bit_quant_type="nf4",
94
+ bnb_4bit_use_double_quant=True,
95
+ bnb_4bit_compute_dtype=torch.float16,
96
+ )
97
+
98
  tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
99
  model = AutoModelForCausalLM.from_pretrained(
100
  model_id,
101
+ quantization_config=bnb_config,
102
  device_map="auto",
103
  trust_remote_code=True
104
  )
105
 
 
106
  system_prompt = """You are Vibe Coder, a world-class principal full-stack software engineer and UI/UX designer.
107
  Write complete, modern, production-grade code in TypeScript, React, Next.js, and Node.js with ZERO placeholders."""
108
 
 
117
  outputs = model.generate(
118
  **inputs,
119
  max_new_tokens=2048,
120
+ temperature=0.2,
121
  top_p=0.95,
122
  repetition_penalty=1.05,
123
  do_sample=True,