Downloads · 30 days
11
12% of all-time downloads
NCUT-AI/Heliars-Phi4-Carla-X1-14B
Heliars-Phi4-Carla-X1-14B is a text generation model from NCUT-AI. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as mit.
Heliars-Carla-X1 是基於 unsloth/phi-4-unsloth-bnb-4bit(Microsoft Phi-4)進行監督式微調的語言模型,專門從英文或繁體中文的自然語言描述生成合法的 OpenDRIVE (.xodr) 路網,供 CARLA 自動駕駛模擬器使用。
Downloads · 30 days
11
12% of all-time downloads
All-time downloads
95
Public
Parameters
14.7B
29.3 GB on disk
Likes
2
Public
Click a slice to open those files.
.safetensors29.3 GB · 100%
From the Hugging Face model README
Heliars-Carla-X1 是基於 unsloth/phi-4-unsloth-bnb-4bit(Microsoft Phi-4)進行監督式微調的語言模型,專門從英文或繁體中文的自然語言描述生成合法的 OpenDRIVE (.xodr) 路網,供 CARLA 自動駕駛模擬器使用。
| 基底模型 | unsloth/phi-4-unsloth-bnb-4bit |
| 架構 | LlamaForCausalLM(Phi-4 via Unsloth) |
| 參數量 | ~14B |
| 精度 | bfloat16 |
| 最大 Context 長度 | 16,384 tokens |
| 訓練方式 | 監督式微調(SFT)+ LoRA |
| 框架 | Unsloth + HuggingFace TRL |
| 任務 | OpenDRIVE 路網生成 |
| 輸入語言 | 英文、繁體中文 |
| 授權 | MIT |
Heliars-Carla-X1 使用雙語(英文 + 繁體中文)資料集進行 LoRA 微調,訓練資料由自然語言路網描述與對應的合法 OpenDRIVE 1.4/1.5 XML 組成,訓練約 1 個 epoch(300 步)。訓練完成後將 LoRA adapter merge 回 base model 並以 bfloat16 儲存。
| LoRA rank | 128 |
| LoRA alpha | 128 |
| LoRA dropout | 0.0 |
| 目標模組 | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj |
| 訓練步數 | 300 步(約 1 epoch) |
| 最高學習率 | 2e-4 |
| 最終訓練 loss | ~0.54 |
You are an OpenDRIVE road network generator that accepts descriptions in English or Traditional Chinese (繁體中文). Output valid OpenDRIVE XML (.xodr) following the 1.4/1.5 specification, with proper header, roads with planView geometry, lane sections, and junction definitions where needed.
你是一個 OpenDRIVE 路網生成器,可接受英文或繁體中文描述。請輸出符合 OpenDRIVE 1.4/1.5 規範的合法 .xodr XML,包含正確的 header、含 planView 幾何的 roads、車道區段,以及必要的 junction 定義。
英文:
Generate a small road cluster suitable for autonomous driving simulation.
The network should have roughly 4 roads with about 0 junctions.
Total road length should be around 320 m.
Roads should have one lane per direction.
Include sidewalks along the roads.
Road geometry should be mostly straight with minimal curves.
繁體中文:
請以 OpenDRIVE (.xodr) 格式生成一個路網,包含 1 條道路與 1 個路口,總長度 136 公尺。請輸出合法的 OpenDRIVE XML。
本模型使用 ChatML 格式,以 <|im_sep|> 作為角色分隔符:
<|im_start|>system<|im_sep|>
{system prompt}<|im_end|>
<|im_start|>user<|im_sep|>
{路網描述}<|im_end|>
<|im_start|>assistant<|im_sep|>
transformersimport transformers
pipeline = transformers.pipeline(
"text-generation",
model="./Heliars-Carla-X1",
model_kwargs={"torch_dtype": "auto"},
device_map="auto",
)
SYSTEM_PROMPT = (
"You are an OpenDRIVE road network generator that accepts descriptions in English or "
"Traditional Chinese (繁體中文). Output valid OpenDRIVE XML (.xodr) following the 1.4/1.5 "
"specification, with proper header, roads with planView geometry, lane sections, and "
"junction definitions where needed.\n\n"
"你是一個 OpenDRIVE 路網生成器,可接受英文或繁體中文描述。請輸出符合 OpenDRIVE 1.4/1.5 規範的合法 "
".xodr XML,包含正確的 header、含 planView 幾何的 roads、車道區段,以及必要的 junction 定義。"
)
messages = [
{"role": "system", "content": SYSTEM_PROMPT},
{"role": "user", "content": "請生成一個住宅區路網,4 條道路、無路口,總長約 320 公尺,每方向一車道,含人行道。"},
]
outputs = pipeline(messages, max_new_tokens=4096)
print(outputs[0]["generated_text"][-1]["content"])
OpenAI-compatible API 呼叫:
from openai import OpenAI
client = OpenAI(base_url="http://localhost:8000/v1", api_key="dummy")
response = client.chat.completions.create(
model="Heliars-Carla-X1",
messages=[
{"role": "system", "content": SYSTEM_PROMPT},
{"role": "user", "content": "請生成一個包含 3 條道路、1 個路口的路網,總長度約 250 公尺。"},
],
max_tokens=4096,
temperature=0.1,
)
print(response.choices[0].message.content)
.xodr 檔案。