Text Generation
Safetensors
Japanese
Chinese
qwen3_5
alignment
post-processing
galgame
anime-subtitles
awq
quantization
text-generation-inference
conversational
4-bit precision
Instructions to use Murasaki-Project/Murasaki-APE-Aligner-2B-AWQ with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Local Apps Settings
- vLLM
How to use Murasaki-Project/Murasaki-APE-Aligner-2B-AWQ with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Murasaki-Project/Murasaki-APE-Aligner-2B-AWQ" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Murasaki-Project/Murasaki-APE-Aligner-2B-AWQ", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Murasaki-Project/Murasaki-APE-Aligner-2B-AWQ
- SGLang
How to use Murasaki-Project/Murasaki-APE-Aligner-2B-AWQ with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Murasaki-Project/Murasaki-APE-Aligner-2B-AWQ" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Murasaki-Project/Murasaki-APE-Aligner-2B-AWQ", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Murasaki-Project/Murasaki-APE-Aligner-2B-AWQ" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Murasaki-Project/Murasaki-APE-Aligner-2B-AWQ", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Murasaki-Project/Murasaki-APE-Aligner-2B-AWQ with Docker Model Runner:
docker model run hf.co/Murasaki-Project/Murasaki-APE-Aligner-2B-AWQ
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,77 @@
|
|
| 1 |
-
---
|
| 2 |
-
|
| 3 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- ja
|
| 4 |
+
- zh
|
| 5 |
+
license: mit
|
| 6 |
+
tags:
|
| 7 |
+
- alignment
|
| 8 |
+
- post-processing
|
| 9 |
+
- galgame
|
| 10 |
+
- anime-subtitles
|
| 11 |
+
- awq
|
| 12 |
+
- quantization
|
| 13 |
+
- text-generation-inference
|
| 14 |
+
|
| 15 |
+
pipeline_tag: text-generation
|
| 16 |
+
---
|
| 17 |
+
<div align="center">
|
| 18 |
+
|
| 19 |
+
<img src="https://github.com/soundstarrain/Murasaki-Translator/raw/main/GUI/resources/icon.png" width="120" height="120" alt="Murasaki Logo">
|
| 20 |
+
|
| 21 |
+
<h1 align="center">Murasaki-APE-Aligner-2B-AWQ</h1>
|
| 22 |
+
|
| 23 |
+
**自动化后处理 · 控制符修复模型 (4-bit AWQ 版)**
|
| 24 |
+
|
| 25 |
+
[Github](https://github.com/soundstarrain/Murasaki-project) | [Murasaki Translator](https://github.com/soundstarrain/Murasaki-Translator) | [License: MIT](https://opensource.org/licenses/MIT)
|
| 26 |
+
|
| 27 |
+
**Other Versions:** [Base (BF16)](https://huggingface.co/Murasaki-Project/Murasaki-APE-Aligner-2B) | [GGUF](https://huggingface.co/Murasaki-Project/Murasaki-APE-Aligner-2B-GGUF)
|
| 28 |
+
|
| 29 |
+
</div>
|
| 30 |
+
|
| 31 |
+
---
|
| 32 |
+
|
| 33 |
+
## 简介
|
| 34 |
+
|
| 35 |
+
**Murasaki-APE-Aligner-2B-AWQ** 是格式修复引擎 Murasaki-APE-Aligner-2B 的 **4-bit AWQ 量化版本**(约 2.42 GB)。该版本在极大地降低显存占用并提升生成速度的同时,保持了与原始精度几乎一致的修复能力。完美支持 `vLLM` 等高并发推理框架,是具有显存限制但需要高速批量处理时的首选版本。
|
| 36 |
+
|
| 37 |
+
**训练数据与核心能力**:
|
| 38 |
+
为了应对极其复杂的真实游戏文本环境,本模型使用了涵盖 40 种以上 Galgame 与 RPG 游戏引擎、超过 1000 种不同格式的游戏控制符数据进行针对性训练。模型能够处理绝大多数控制符错位、丢失、冗余或参数被错误翻译的问题,并稳定输出逻辑正确、语法及代码完全正确的文本。
|
| 39 |
+
|
| 40 |
+
**核心机制**:
|
| 41 |
+
读取包含原文与模型初翻的 JSON 格式输入,自动对齐并修复草稿中损坏的控制代码。**模型仅处理代码与格式规范,不会改动任何译文的具体内容**。修复完成后直接输出纯文本字符串。
|
| 42 |
+
|
| 43 |
+
---
|
| 44 |
+
|
| 45 |
+
## 核心 Prompt 与输入输出格式
|
| 46 |
+
|
| 47 |
+
请使用以下格式激活模型的修复与对齐能力:
|
| 48 |
+
|
| 49 |
+
### 1. System Prompt
|
| 50 |
+
```text
|
| 51 |
+
你是一个格式修复引擎。请读取JSON输入的原文和草稿,修复草稿中的控制符和格式,直接输出修复后的字符串,不要输出任何额外的JSON标签或解释。
|
| 52 |
+
```
|
| 53 |
+
|
| 54 |
+
### 2. User Input
|
| 55 |
+
必须为包含 `ja` (原文) 和 `zh` (译文初翻) 的 JSON 字符串:
|
| 56 |
+
```json
|
| 57 |
+
{"ja": "その意思は[font color=0x64E560]尊重[resetfont]したいが……", "zh": "我很想[font color=0x64E560]尊重[resetfont][resetfont]你的意志……"}
|
| 58 |
+
```
|
| 59 |
+
|
| 60 |
+
### 3. Model Output
|
| 61 |
+
模型将直接返回修复后的纯文本,无任何多余的 JSON 嵌套或解释:
|
| 62 |
+
```text
|
| 63 |
+
我很想[font color=0x64E560]尊重[resetfont]你的意志……
|
| 64 |
+
```
|
| 65 |
+
|
| 66 |
+
---
|
| 67 |
+
|
| 68 |
+
## 建议超参数 (Recommended Hyperparameters)
|
| 69 |
+
|
| 70 |
+
推荐参数如下:
|
| 71 |
+
|
| 72 |
+
* **temperature**: `0.0` ~ `0.1` (越低越稳定)
|
| 73 |
+
* **top_p**: `1.0`
|
| 74 |
+
* **top_k**: `1` (或禁用)
|
| 75 |
+
* **repetition_penalty**: `1.0` ~ `1.05`
|
| 76 |
+
```
|
| 77 |
+
|