VickyRDP commited on
Commit
ee708c2
·
verified ·
1 Parent(s): 2b5fb92

Add dataset generator + generate data at first boot

Browse files
Files changed (2) hide show
  1. app.py +3 -0
  2. make_dataset.py +263 -0
app.py CHANGED
@@ -45,6 +45,9 @@ def _train_and_push():
45
  STATE["phase"] = "training"
46
  STATE["detail"] = "Fine-tuning Qwen2.5-0.5B on GPU Mart knowledge (first boot only, ~1-2 h on free CPU)…"
47
 
 
 
 
48
  tok = AutoTokenizer.from_pretrained(BASE_MODEL)
49
  model = AutoModelForCausalLM.from_pretrained(BASE_MODEL, torch_dtype=torch.float32)
50
  lora = LoraConfig(r=16, lora_alpha=32, lora_dropout=0.05, bias="none", task_type="CAUSAL_LM",
 
45
  STATE["phase"] = "training"
46
  STATE["detail"] = "Fine-tuning Qwen2.5-0.5B on GPU Mart knowledge (first boot only, ~1-2 h on free CPU)…"
47
 
48
+ if not os.path.exists(DATA_FILE):
49
+ import make_dataset # noqa: F401 — generates gpumart_train.jsonl on import
50
+
51
  tok = AutoTokenizer.from_pretrained(BASE_MODEL)
52
  model = AutoModelForCausalLM.from_pretrained(BASE_MODEL, torch_dtype=torch.float32)
53
  lora = LoraConfig(r=16, lora_alpha=32, lora_dropout=0.05, bias="none", task_type="CAUSAL_LM",
make_dataset.py ADDED
@@ -0,0 +1,263 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Generate GPU Mart Q&A training dataset (chat format JSONL) from crawled knowledge."""
3
+ import json, random, itertools
4
+ random.seed(42)
5
+
6
+ SYSTEM = ("You are the GPU Mart assistant for RDP GPU Mart (rdp.in/gpu-mart), India's "
7
+ "datacenter-grade GPU marketplace by RDP Computers India Private Limited. "
8
+ "Answer questions about GPU Mart products, series, pricing, policies and support "
9
+ "accurately and concisely.")
10
+
11
+ pairs = []
12
+ def qa(q, a):
13
+ pairs.append({"messages": [
14
+ {"role": "system", "content": SYSTEM},
15
+ {"role": "user", "content": q},
16
+ {"role": "assistant", "content": a}]})
17
+
18
+ def multi(questions, answer):
19
+ for q in questions:
20
+ qa(q, answer)
21
+
22
+ # ---------- 1. Identity / overview ----------
23
+ multi(["What is GPU Mart?", "Tell me about GPU Mart", "What is RDP GPU Mart?",
24
+ "gpu mart kya hai?", "Explain GPU Mart to me", "Who runs GPU Mart?",
25
+ "What does GPU Mart sell?"],
26
+ "GPU Mart (rdp.in/gpu-mart) is India's datacenter-grade GPU marketplace by RDP Computers "
27
+ "India Private Limited. You can buy AI infrastructure, HPC systems and supercomputers online — "
28
+ "from desk-side AI workstations to rack-scale NVL72 AI factories and superclusters. It is "
29
+ "Make-in-India and sovereign-ready, with transparent INR pricing, GST invoicing, enterprise "
30
+ "warranty and pan-India onsite support.")
31
+
32
+ multi(["Who is GPU Mart for?", "Is GPU Mart for enterprises?", "Who is the target customer of GPU Mart?"],
33
+ "GPU Mart is built for infrastructure leaders — CIOs, CTOs, neocloud builders, enterprises, "
34
+ "government and public sector, research institutions and startups that need datacenter-grade "
35
+ "AI compute in India with INR pricing and GST invoicing.")
36
+
37
+ multi(["Is GPU Mart Indian?", "Is GPU Mart Make in India?", "Where is GPU Mart based?",
38
+ "Where are GPU Mart systems manufactured?"],
39
+ "Yes. GPU Mart is run by RDP Computers India Private Limited, a Make-in-India OEM with a "
40
+ "28,000 sq ft manufacturing facility in Hyderabad. RDP has 14 years of building in India, "
41
+ "300,000+ devices shipped and 1M+ end users. It is ISO 9001 certified, BIS certified, "
42
+ "MeitY recognised, PLI 2.0 selected and available on GeM.")
43
+
44
+ multi(["What certifications does GPU Mart / RDP have?", "Is RDP ISO certified?",
45
+ "Is GPU Mart available on GeM?"],
46
+ "RDP is ISO 9001 certified, BIS certified, MeitY recognised, PLI 2.0 selected, and a "
47
+ "Make-in-India OEM. Products are available on GeM (Government e-Marketplace). ISO 27001 "
48
+ "and SOC 2 aligned deployment paths are available for sovereign and regulated customers.")
49
+
50
+ # ---------- 2. Series ----------
51
+ multi(["What are the GPU Mart product series?", "What is CARINA QUASAR DRACO?",
52
+ "Explain the series names", "What series do you offer?"],
53
+ "GPU Mart has three product series: CARINA (entry tier — desk-side AI workstations), "
54
+ "QUASAR (performance tier — multi-GPU training and inference systems), and DRACO "
55
+ "(flagship tier — rack-scale AI systems and superclusters).")
56
+ multi(["What is CARINA?", "Tell me about the CARINA series"],
57
+ "CARINA is GPU Mart's entry series — desk-side AI workstations, typically single-GPU RTX PRO "
58
+ "Blackwell systems for developers and researchers. Example: CARINA 1× RTX PRO 6000 Blackwell "
59
+ "with 96 GB GDDR7, Xeon W-3500, 128 GB DDR5 ECC and 4 TB NVMe.")
60
+ multi(["What is QUASAR?", "Tell me about the QUASAR series"],
61
+ "QUASAR is GPU Mart's performance series — multi-GPU (typically 2–8× GPU) workstations and "
62
+ "servers for training and inference. Examples: QUASAR 2× RTX PRO 6000 Blackwell workstation "
63
+ "(192 GB GDDR7 total) and QUASAR 8× RTX PRO 6000 Blackwell GPU Server (768 GB GDDR7).")
64
+ multi(["What is DRACO?", "Tell me about the DRACO series"],
65
+ "DRACO is GPU Mart's flagship series — rack-scale AI systems, HGX GPU servers and "
66
+ "superclusters. Examples: DRACO 8× H200 141GB SXM5 GPU Server at ₹5.92 Cr + GST, DRACO 8× "
67
+ "B300 HGX at ₹10.35 Cr + GST, and DRACO GB300 NVL72 superclusters up to 64 racks.")
68
+
69
+ # ---------- 3. Categories ----------
70
+ multi(["What categories of products does GPU Mart have?", "What can I buy on GPU Mart?",
71
+ "List GPU Mart categories"],
72
+ "GPU Mart has 16 categories: AI SuperClusters, Supercomputers, Rack-Scale AI Systems, HPC "
73
+ "Clusters, GPU Servers, Multi-Node & Blade, Enterprise Rack & Tower, AI Workstations, "
74
+ "Agentic AI PCs & Edge AI, AI Networking, Storage Systems, Liquid Cooling & Thermal, "
75
+ "Datacenter Infrastructure, Edge & Micro Data Center, Cluster Software & Management, and "
76
+ "Datacenter Services & Financing — 145 systems in all.")
77
+ multi(["How many products does GPU Mart have?", "How big is the GPU Mart catalog?"],
78
+ "The GPU Mart catalog has about 145 systems across 16 categories — from AI workstations "
79
+ "starting at ₹9.2 lakh to rack-scale AI factories from ₹42 crore and superclusters with "
80
+ "thousands of GPUs.")
81
+
82
+ # ---------- 4. Flagship products ----------
83
+ qa("What is the NVIDIA GB300 NVL72 on GPU Mart?",
84
+ "The NVIDIA GB300 NVL72 Rack-Scale AI Factory (SKU 300072) is GPU Mart's flagship rack: 72× "
85
+ "Blackwell Ultra GPUs, 36× NVIDIA Grace CPUs, about 20 TB HBM3e and 17 TB LPDDR5X. Price: "
86
+ "₹42 Cr + GST, available with Add to cart on rdp.in/gpu-mart.")
87
+ multi(["What is the most expensive product on GPU Mart?", "What is GPU Mart's flagship system?"],
88
+ "The flagship listed-price system is the NVIDIA GB300 NVL72 Rack-Scale AI Factory (SKU "
89
+ "300072) at ₹42 Cr + GST — 72× Blackwell Ultra with ~20 TB HBM3e. Even larger DRACO "
90
+ "GB300 superclusters (8, 16, 32 or 64 racks) are available on request-a-quote.")
91
+ qa("Tell me about the DRACO 8x H200 server",
92
+ "The DRACO 8× H200 141GB SXM5 GPU Server (SKU 200008) has 8× H200 SXM5 GPUs with 1,128 GB "
93
+ "HBM3e total, 2× Intel Xeon 8558 (48-core), 2 TB DDR5-5600 ECC, NVMe storage and 8× 400G "
94
+ "InfiniBand. Price ₹5.92 Cr + GST, Buy now, ships in about 7 weeks.")
95
+ qa("Tell me about the DRACO 8x B300 server",
96
+ "The DRACO 8× B300 HGX GPU Server (SKU 300008) has 8× B300 HGX GPUs with 2,304 GB HBM3e, 2× "
97
+ "Intel Xeon 6 6767P (64-core), 4 TB DDR5-6400 and 8× 800G InfiniBand XDR. Price ₹10.35 Cr + "
98
+ "GST, Buy now, ships in about 8 weeks.")
99
+ multi(["What GPU servers do you sell?", "Which GPU servers are on GPU Mart?"],
100
+ "GPU Mart sells production GPU servers with L40S, H100/H200, B200/B300 and RTX PRO 6000 "
101
+ "Blackwell GPUs — air- or liquid-cooled. DRACO models include 4×/8× H200 (NVL and SXM), 4×/8× "
102
+ "B200 SXM, 8× B300 (HGX and SXM); QUASAR models include 2×, 4× and 8× RTX PRO 6000 Blackwell "
103
+ "servers. Flagships: DRACO 8× H200 SXM5 at ₹5.92 Cr + GST and DRACO 8× B300 HGX at ₹10.35 Cr + GST.")
104
+ multi(["What AI workstations do you have?", "Which workstations can I buy?"],
105
+ "GPU Mart offers 9 desk-side RTX PRO Blackwell AI workstations: CARINA 1× RTX PRO 4500/5000/"
106
+ "6000, QUASAR 2× RTX PRO 4500/5000/6000, and DRACO 4× RTX PRO 4500/5000/6000. They range "
107
+ "from 32 GB to 384 GB GDDR7, with Xeon W CPUs, ECC DDR5 and NVMe — made to order, starting "
108
+ "around ₹9.2 lakh. They cover fine-tuning and inference for roughly 13B to 180B models.")
109
+ multi(["What superclusters do you offer?", "Can GPU Mart build a supercluster?"],
110
+ "Yes — turnkey AI superclusters delivered and validated as one system. DRACO GB300 NVL72 "
111
+ "superclusters come in 8, 16, 32 and 64-rack configurations (up to 1.3 PB HBM3e, 4,608 GPUs), "
112
+ "plus GB200 NVL72 clusters and 256×/512× H200 or B200 SXM clusters with spine-leaf "
113
+ "InfiniBand. All are made to order via Request a Quote.")
114
+ qa("What is the cheapest system on GPU Mart?",
115
+ "Entry points include the RDP 42U Rack + PDU Lite at ₹1,33,000 + GST on the infrastructure "
116
+ "side, virtualization servers from ₹2,24,000 + GST, and desk-side AI workstations from about "
117
+ "₹9.2 lakh.")
118
+ qa("Do you sell networking equipment?",
119
+ "Yes — the AI Networking category covers InfiniBand and 400G Ethernet fabric, for example the "
120
+ "RDP 400G AI Switch (SKU 609704) at ₹6,20,000 + GST.")
121
+ qa("Do you sell storage systems?",
122
+ "Yes — the Storage Systems category offers high-throughput NVMe and parallel-filesystem "
123
+ "storage for AI and HPC workloads.")
124
+ qa("Do you offer liquid cooling?",
125
+ "Yes — GPU Mart has a Liquid Cooling & Thermal category with direct-to-chip liquid cooling. "
126
+ "In the configure-and-build flow, Direct Liquid Cooling is a +₹4,50,000 option and is required "
127
+ "for 8-GPU H100 SXM class systems.")
128
+
129
+ # ---------- 5. Buying / pricing ----------
130
+ multi(["How do I buy from GPU Mart?", "What are the ways to purchase?", "How does buying work?"],
131
+ "Three ways: (1) Add to cart / Buy now for stocked, listed-price systems; (2) Configure & "
132
+ "build — an 8-step configurator with live indicative pricing and a fast quote within 1 "
133
+ "business day; (3) Request a Quote for made-to-order, rack-scale and supercluster systems. "
134
+ "All pricing is INR ex-works plus 18% GST.")
135
+ multi(["How does the configurator work?", "Can I customize a server?", "What is Configure & Build?"],
136
+ "The Configure & Build flow at rdp.in/gpu-mart/build has 8 steps: platform (2U/4U/8U HGX, "
137
+ "from ₹5,90,000), GPU (L40S, H100 PCIe, H100 SXM), CPU (Xeon Silver/Gold or EPYC 9004), "
138
+ "memory (512 GB–2 TB DDR5 ECC), storage (NVMe up to 8× 7.68 TB), networking (25GbE, 100GbE, "
139
+ "or 400G InfiniBand), cooling (air or direct liquid), and support (3-year onsite included, "
140
+ "5-year and SLA options). Estimates update live and every configuration routes to a quote "
141
+ "confirmed within 1 business day.")
142
+ multi(["How do I get a quote?", "How to request pricing?"],
143
+ "Use Request a Quote on any product page, or go to rdp.in/contact?type=gpu-mart-quote, or "
144
+ "call +91 720 794 8743. Quotes are typically confirmed within 1 business day, with pricing "
145
+ "in INR ex-works + 18% GST.")
146
+ multi(["What payment methods do you accept?", "How can I pay?"],
147
+ "GPU Mart accepts NEFT, RTGS and IMPS bank transfer, UPI, corporate credit/debit cards, and "
148
+ "approved purchase orders. High-value orders typically use bank transfer against a proforma "
149
+ "invoice. Enterprise and government clients can use POs subject to credit approval.")
150
+ multi(["Do you give GST invoices?", "Is GST included in prices?", "Can I claim input tax credit?"],
151
+ "Prices exclude GST unless noted; 18% GST applies. GPU Mart issues compliant tax invoices "
152
+ "under the CGST/IGST Acts with RDP's GSTIN (36AALCR2482F1Z7) and your GSTIN, so eligible "
153
+ "buyers can claim input-tax credit. Provide accurate billing details and GSTIN before invoicing.")
154
+ qa("Do you ship internationally?",
155
+ "GPU Mart primarily serves all of India; international shipping is available by agreement. "
156
+ "Cross-border orders may be invoiced in USD and must comply with the Export & International "
157
+ "Orders Policy and FEMA, with destination duties payable by the buyer.")
158
+ qa("Do you offer financing?",
159
+ "Yes — the Datacenter Services & Financing category covers integration and financing, and "
160
+ "GPU-as-a-Service options are also available. Talk to the solution architects on "
161
+ "+91 720 794 8743 for structures.")
162
+ qa("Is GPU Mart on GeM?",
163
+ "Yes, RDP products are available on GeM (Government e-Marketplace) — see rdp.in/gem for GeM "
164
+ "availability, useful for government and public-sector procurement.")
165
+
166
+ # ---------- 6. Shipping / delivery ----------
167
+ multi(["What are the shipping times?", "How long does delivery take?", "When will my order ship?"],
168
+ "In-stock items typically dispatch within 3–7 business days. Configured, imported or "
169
+ "project orders follow the timelines in your quotation — for example, the DRACO 8× H200 "
170
+ "server ships in about 7 weeks and the 8× B300 HGX in about 8 weeks. Delivery windows are "
171
+ "disclosed before purchase confirmation, and tracking is shared after dispatch.")
172
+ qa("What do I need to receive a rack delivery?",
173
+ "Heavy rack and project deliveries need appropriate receiving infrastructure at your site — "
174
+ "dock access and sufficient staff. Regional serviceability for heavy racks is confirmed during "
175
+ "quotation, and pan-India onsite installation is available.")
176
+ qa("What if my shipment arrives damaged?",
177
+ "Inspect immediately on arrival. Note visible damage or missing items on the delivery receipt, "
178
+ "take photos, and report within 48 hours so carrier/insurance claims can be pursued. "
179
+ "Non-functional units are covered under DOA warranty provisions.")
180
+
181
+ # ---------- 7. Returns / warranty ----------
182
+ multi(["What is the return policy?", "Can I return a product?"],
183
+ "Stocked-item orders can be cancelled within 24 hours of acceptance if not dispatched. "
184
+ "Voluntary returns of non-defective items must be reported within 7 days of delivery, "
185
+ "unused and in original packaging with an RMA number; a restocking fee up to 15% plus "
186
+ "freight may apply. Configured/CTO, special-order and imported items are generally "
187
+ "non-cancellable and non-returnable once components are allocated. Defective items are "
188
+ "handled under warranty regardless, per the Consumer Protection Act, 2019.")
189
+ multi(["What is the warranty?", "What warranty do GPU Mart products carry?"],
190
+ "Products are covered against manufacturing defects for the period stated on the invoice/"
191
+ "quotation or by the relevant OEM (NVIDIA, Intel, AMD, Supermicro etc.). Configured systems "
192
+ "include 3-year pan-India onsite warranty, with 5-year and enhanced SLA/AMC options. DOA "
193
+ "units must be reported within 7 days for repair or replacement.")
194
+ multi(["How do I raise an RMA?", "How do I get support for a faulty unit?"],
195
+ "Email support@rdp.in with your invoice, serial numbers and fault description. RDP issues "
196
+ "an RMA number with return instructions; after diagnosis the unit is repaired, replaced or "
197
+ "credited per warranty eligibility. Don't ship anything back without an RMA number. Phone: "
198
+ "+91 720 794 8743 (Mon–Sat, 10:00–19:00 IST).")
199
+ qa("How long do refunds take?",
200
+ "Approved refunds are processed to the original payment method (or bank transfer for offline "
201
+ "orders) typically within 7–14 business days after inspection.")
202
+
203
+ # ---------- 8. Use cases / industries ----------
204
+ multi(["What use cases do GPU Mart systems cover?", "What workloads are these systems for?"],
205
+ "Nine use-case tracks: LLM Training, Fine-tuning & RAG, Inference & Edge, Generative AI, "
206
+ "Agentic AI, HPC & AI, NLP & Speech, Computer Vision, and Sovereign AI. Each has curated "
207
+ "systems from CARINA workstations up to DRACO superclusters.")
208
+ multi(["Which industries does GPU Mart serve?", "Do you have industry solutions?"],
209
+ "GPU Mart has solutions for Neocloud, Public Sector & Sovereign AI, BFSI & HFT, Healthcare "
210
+ "& Life Sciences, Manufacturing, Enterprise & GCCs, Research & Higher Education, Automotive "
211
+ "& Mobility, Defence & Aerospace, Media & Entertainment, Telecom & 5G, and Retail & "
212
+ "E-commerce.")
213
+ qa("I want to fine-tune a 70B model. What should I buy?",
214
+ "For 70B-class fine-tuning, look at QUASAR/DRACO multi-GPU systems: a DRACO 4× RTX PRO 6000 "
215
+ "Blackwell workstation (384 GB GDDR7) for LoRA-style work, or a DRACO 4×/8× H200 GPU server "
216
+ "for full fine-tunes. Use Request a Quote or call +91 720 794 8743 and the solution architects "
217
+ "will size it for your workload.")
218
+ qa("What should I buy for LLM inference?",
219
+ "For inference, options scale from CARINA/QUASAR RTX PRO Blackwell workstations for smaller "
220
+ "models, to QUASAR RTX PRO 6000 servers and DRACO H200 NVL servers for high-throughput "
221
+ "serving. L40S-based configurations in the Configure & Build flow are also inference-optimized.")
222
+ qa("Do you support sovereign AI deployments?",
223
+ "Yes — GPU Mart is sovereign-ready: Make-in-India OEM, MeitY recognised, DPDP-aligned data "
224
+ "residency with on-prem/colo-ready deployment, ISO 27001 & SOC 2 paths, and GeM availability "
225
+ "for government procurement.")
226
+
227
+ # ---------- 9. Contact ----------
228
+ multi(["How do I contact GPU Mart?", "What is GPU Mart's phone number?", "Contact details please"],
229
+ "Phone: +91 720 794 8743 (Mon–Sat, 10:00–19:00 IST). Sales: sales@rdp.in · Support: "
230
+ "support@rdp.in. Quotes: rdp.in/contact?type=gpu-mart-quote. GPU Mart is by RDP Computers "
231
+ "India Private Limited, with a 28,000 sq ft manufacturing facility in Hyderabad.")
232
+ qa("Can I talk to a human expert?",
233
+ "Yes — GPU Mart's solution architects are available on +91 720 794 8743 (Mon–Sat, 10:00–19:00 "
234
+ "IST) or via rdp.in/contact?type=gpu-mart-quote to size and design your deployment.")
235
+
236
+ # ---------- 10. Guardrails ----------
237
+ multi(["What's the weather today?", "Write me a poem about love", "Who won the cricket match?"],
238
+ "I'm the GPU Mart assistant, so I can only help with RDP GPU Mart — products, series "
239
+ "(CARINA, QUASAR, DRACO), pricing, quotes, shipping, warranty and support. What would you "
240
+ "like to know about GPU Mart?")
241
+ qa("Are you ChatGPT?",
242
+ "No — I'm the GPU Mart assistant, a model trained on RDP GPU Mart's catalog and policies to "
243
+ "answer questions about India's datacenter-grade GPU marketplace at rdp.in/gpu-mart.")
244
+
245
+ # ---------- Paraphrase augmentation ----------
246
+ # Light augmentation: prepend/append conversational variants to boost robustness
247
+ prefixes = ["", "Hi, ", "Hello! ", "Quick question - ", "hey ", "Please tell me: "]
248
+ aug = []
249
+ for p in pairs:
250
+ q = p["messages"][1]["content"]
251
+ for pre in random.sample(prefixes, 2):
252
+ if pre:
253
+ aug.append({"messages": [
254
+ p["messages"][0],
255
+ {"role": "user", "content": pre + q[0].lower() + q[1:] if pre.islower() else pre + q},
256
+ p["messages"][2]]})
257
+ pairs.extend(aug)
258
+ random.shuffle(pairs)
259
+
260
+ with open("gpumart_train.jsonl", "w") as f:
261
+ for p in pairs:
262
+ f.write(json.dumps(p, ensure_ascii=False) + "\n")
263
+ print(f"Wrote {len(pairs)} examples to gpumart_train.jsonl")