Safetensors
qwen3_5
wbhVince829 commited on
Commit
0974402
·
1 Parent(s): 2c4e721

add quickstart

Browse files
Files changed (1) hide show
  1. README.md +67 -1
README.md CHANGED
@@ -130,6 +130,72 @@ KU/DFI's role is to build that open commons. The program now spans the key layer
130
  - **Model weights.** [KU-DFI/TelecomGPT-R1](https://huggingface.co/KU-DFI/TelecomGPT-R1/tree/main)
131
  - **Unified benchmark.** [GSMA Open Telco Leaderboard](https://huggingface.co/spaces/GSMA/open-telco-leaderboard)
132
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
133
  ### Citation
134
 
135
  ```bibtex
@@ -153,4 +219,4 @@ KU/DFI's role is to build that open commons. The program now spans the key layer
153
 
154
  ### Acknowledgements
155
 
156
- This work was supported by the Digital Future Institute of Khalifa University; the College of Information Science and Electronic Engineering, Zhejiang University; the College of Computer Science and Technology, Zhejiang University; and the Research Computing team of Khalifa University.
 
130
  - **Model weights.** [KU-DFI/TelecomGPT-R1](https://huggingface.co/KU-DFI/TelecomGPT-R1/tree/main)
131
  - **Unified benchmark.** [GSMA Open Telco Leaderboard](https://huggingface.co/spaces/GSMA/open-telco-leaderboard)
132
 
133
+ ### Quickstart
134
+
135
+ Here is a code snippet demonstrating how to load TelecomGPT-R1 with `transformers` and generate a telecom-grounded response:
136
+
137
+ ```python
138
+ from transformers import AutoModelForCausalLM, AutoTokenizer
139
+
140
+ model_name = "KU-DFI/TelecomGPT-R1"
141
+
142
+ model = AutoModelForCausalLM.from_pretrained(
143
+ model_name,
144
+ torch_dtype="auto",
145
+ device_map="auto",
146
+ )
147
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
148
+
149
+ prompt = (
150
+ "A 5G NR cell is observing repeated random-access failures from cell-edge UEs. "
151
+ "Drive-test capture shows: average RSRP = -108 dBm, average RSRQ = -16 dB, "
152
+ "PRACH preamble attempts averaging 8 with no Msg2 (RAR) received within "
153
+ "ra-ResponseWindow, UE timing-advance range 4-7 km, and PRACH configuration "
154
+ "uses preamble format A1 with zeroCorrelationZoneConfig = 8. "
155
+ "Diagnose the most likely root cause and propose a configuration change."
156
+ )
157
+ messages = [
158
+ {
159
+ "role": "system",
160
+ "content": (
161
+ "You are TelecomGPT-R1, an open 27B telecom reasoning model from "
162
+ "KU/DFI. Reason step-by-step over 3GPP standards, RAN logs, RF and "
163
+ "network derivations, and telecom code."
164
+ ),
165
+ },
166
+ {"role": "user", "content": prompt},
167
+ ]
168
+ text = tokenizer.apply_chat_template(
169
+ messages,
170
+ tokenize=False,
171
+ add_generation_prompt=True,
172
+ )
173
+ model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
174
+
175
+ generated_ids = model.generate(
176
+ **model_inputs,
177
+ max_new_tokens=2048,
178
+ )
179
+ generated_ids = [
180
+ output_ids[len(input_ids):]
181
+ for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
182
+ ]
183
+
184
+ response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
185
+ print(response)
186
+ ```
187
+
188
+ For production / batch serving on operator-confidential data, host with [vLLM](https://github.com/vllm-project/vllm):
189
+
190
+ ```bash
191
+ vllm serve KU-DFI/TelecomGPT-R1 \
192
+ --tensor-parallel-size 4 \
193
+ --max-model-len 32768 \
194
+ --gpu-memory-utilization 0.90
195
+ ```
196
+
197
+ **Hardware**: TelecomGPT-R1 (27B, bf16) fits on a single H100 80GB or MI300X; for high-throughput inference behind an operator firewall a single H100/MI300 node serves the model end-to-end.
198
+
199
  ### Citation
200
 
201
  ```bibtex
 
219
 
220
  ### Acknowledgements
221
 
222
+ This work was supported by the Digital Future Institute of Khalifa University; the College of Information Science and Electronic Engineering, Zhejiang University; the College of Computer Science and Technology, Zhejiang University; and the Research Computing team of Khalifa University.