文件
JGZYES 28535b1c74 ParlzMAI: pure-C MoE inference + ParlzAIPlatformPAP framework
- pmai unified CLI (generate/chat/interactive/http/inspect/output/config)
- GPT+MoE transformer, .pap (f32/fp16/q8) + GGUF loader (order+version adaptive)
- llama/Mixtral arch: RoPE+GQA+SwiGLU+MoE (C==torch verified)
- C llama BPE tokenizer (validated vs llama-cpp-python)
- training framework + 0.1B/0.22B MoE models; quantization fp16/q8
- build artifacts to output/; HTTP API; config.yaml; scripts; openapi
2026-09-07 07:16:58 +08:00

52 行
1.5 KiB
YAML

openapi: 3.0.0
info:
title: ParlzMAI API
version: 1.0.0
description: pmai HTTP 服务(--serve,需 -DBUILD_HTTP=ON)。MoE 推理生成。
servers:
- url: http://127.0.0.1:11434
paths:
/health:
get:
summary: 健康检查
responses:
'200': { description: ok }
/api/models:
get:
summary: 已加载模型信息
responses:
'200':
description: JSON 模型信息
content:
application/json:
schema:
type: object
properties:
model: { type: string }
params: { type: integer }
arch: { type: string }
n_experts: { type: integer }
/api/generate:
post:
summary: 生成(SSE 流式)
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
prompt: { type: string, example: 'ROMEO:' }
options:
type: object
properties:
max_tokens: { type: integer, example: 60 }
temperature: { type: number, example: 0.8 }
top_k: { type: integer, example: 40 }
responses:
'200':
description: SSE text/event-stream,每事件 data: {"response":"..."}
content:
text/event-stream:
schema: { type: string }