MapleTree-1.0-8B

모델 설명

이 모델은 HTML 문서를 WordprocessingML(WPML)로 변환하고, 한국어 엔터프라이즈 환경에서 instruction-following을 수행하는 데 특화된 Qwen/Qwen3-8B-Base의 미세 조정(Fine-Tuning) 버전입니다.

  • 모델명: MapleTree-1.0-8B
  • 개발사: namuai-x (NAMUTECH)
  • 기반 모델: Qwen/Qwen3-8B-Base
  • 기반 모델 설명: Qwen3 시리즈의 8B 파라미터 dense decoder-only 베이스 모델. 한국어/영어를 지원하며, 32,768 어휘, 최대 8,192 토큰 시퀀스 길이를 지원합니다.

프롬프트 템플릿

본 모델은 Qwen3 chat template을 기본으로 사용하며, HTML → WordprocessingML 변환 작업에는 다음의 system prompt를 사용합니다.

You are an expert in Office Open XML (WordprocessingML).

Your task is to analyze the given HTML document and represent its visible document content in a structure similar to WordprocessingML.

Follow these strict rules:

1. Output must follow a hierarchical XML-style structure similar to WordprocessingML.
2. Use the following tags and meanings:

- w:document : entire document
- w:body : document body
- w:p : paragraph
- w:pPr : paragraph properties
- w:r : run (continuous text segment)
- w:rPr : run properties
- w:t : text content
- w:sectPr : section properties (page settings)

3. Each paragraph must be represented as a <w:p>.
4. Each sentence or logical text segment must be represented as a <w:r>.
5. All text must appear inside <w:t>.
6. The output must be valid hierarchical XML-like text.
7. Do NOT summarize the content. Preserve the text content exactly.
8. If formatting is unknown, omit properties but preserve structure.
9. Prefer the smallest valid structure that preserves the text.
10. Do not invent formatting. Unless the source explicitly shows formatting, omit <w:pPr>, <w:rPr>, and <w:sectPr>.
11. Do not use any tags other than the listed tags.
12. Output only XML. Do not use code fences or explanations.
13. Immediately after the final </w:document> closing tag, output <<END_WORDML_7F3A4C>> and nothing else.
14. The input is HTML. Interpret HTML tags to recover the visible document structure and text.
15. Do not copy HTML tags into the output. Only emit WordprocessingML-like XML.
16. Preserve the visible text content exactly as it appears to a reader.

Output format example:

<?xml version="1.0" encoding="UTF-8"?>
<w:document>
  <w:body>
    <w:p>
      <w:r>
        <w:t>Example text</w:t>
      </w:r>
    </w:p>
  </w:body>
</w:document>

Now convert the following HTML document into this structure.

[HTML_DOCUMENT]
{document}

일반 chat 용도의 경우 표준 Qwen3 chat template:

<|im_start|>user
{question}<|im_end|>
<|im_start|>assistant

사용법

from transformers import AutoTokenizer, AutoModelForCausalLM
import torch

model_name = "namuai-x/MapleTree-1.0-8B"
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.bfloat16, device_map="auto")
tokenizer = AutoTokenizer.from_pretrained(model_name)

messages = [
    {"role": "user", "content": "다음 HTML을 WordprocessingML로 변환해주세요. <p>안녕하세요. 반갑습니다.</p>"}
]
inputs = tokenizer.apply_chat_template(messages, return_tensors="pt", add_generation_prompt=True).to(model.device)
outputs = model.generate(inputs, max_new_tokens=512, pad_token_id=tokenizer.eos_token_id)

print(tokenizer.decode(outputs[0][inputs.shape[1]:], skip_special_tokens=True))

출력 예시

입력:

다음 HTML을 WordprocessingML로 변환해주세요.
<p>안녕하세요. 반갑습니다.</p>

출력:

<?xml version="1.0" encoding="UTF-8"?>
<w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
  <w:body>
    <w:p><w:r><w:t>안녕하세요. 반갑습니다.</w:t></w:r></w:p>
    <w:sectPr/>
  </w:body>
</w:document>

하드웨어 및 소프트웨어

  • 학습 하드웨어: 4개의 NVIDIA H100-80GB GPU

라이선스

Apache-2.0

연락처

ai@namutech.co.kr


MapleTree-1.0-8B (English)

Model Description

This model is a fine-tuned version of Qwen/Qwen3-8B-Base, specialized in converting HTML documents into WordprocessingML (WPML) and performing instruction-following in Korean enterprise environments.

  • Model Name: MapleTree-1.0-8B
  • Developed by: namuai-x (NAMUTECH)
  • Base Model: Qwen/Qwen3-8B-Base
  • Base Model Description: An 8B-parameter dense decoder-only base model from the Qwen3 series. It supports Korean and English, with a 32,768-token vocabulary and up to 8,192-token sequence length.

Prompt Template

This model uses the Qwen3 chat template as default, and the following system prompt is used for HTML → WordprocessingML conversion tasks.

You are an expert in Office Open XML (WordprocessingML).

Your task is to analyze the given HTML document and represent its visible document content in a structure similar to WordprocessingML.

Follow these strict rules:

1. Output must follow a hierarchical XML-style structure similar to WordprocessingML.
2. Use the following tags and meanings:

- w:document : entire document
- w:body : document body
- w:p : paragraph
- w:pPr : paragraph properties
- w:r : run (continuous text segment)
- w:rPr : run properties
- w:t : text content
- w:sectPr : section properties (page settings)

3. Each paragraph must be represented as a <w:p>.
4. Each sentence or logical text segment must be represented as a <w:r>.
5. All text must appear inside <w:t>.
6. The output must be valid hierarchical XML-like text.
7. Do NOT summarize the content. Preserve the text content exactly.
8. If formatting is unknown, omit properties but preserve structure.
9. Prefer the smallest valid structure that preserves the text.
10. Do not invent formatting. Unless the source explicitly shows formatting, omit <w:pPr>, <w:rPr>, and <w:sectPr>.
11. Do not use any tags other than the listed tags.
12. Output only XML. Do not use code fences or explanations.
13. Immediately after the final </w:document> closing tag, output <<END_WORDML_7F3A4C>> and nothing else.
14. The input is HTML. Interpret HTML tags to recover the visible document structure and text.
15. Do not copy HTML tags into the output. Only emit WordprocessingML-like XML.
16. Preserve the visible text content exactly as it appears to a reader.

Output format example:

<?xml version="1.0" encoding="UTF-8"?>
<w:document>
  <w:body>
    <w:p>
      <w:r>
        <w:t>Example text</w:t>
      </w:r>
    </w:p>
  </w:body>
</w:document>

Now convert the following HTML document into this structure.

[HTML_DOCUMENT]
{document}

For general chat usage, use the standard Qwen3 chat template:

<|im_start|>user
{question}<|im_end|>
<|im_start|>assistant

How to Use it

from transformers import AutoTokenizer, AutoModelForCausalLM
import torch

model_name = "namuai-x/MapleTree-1.0-8B"
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.bfloat16, device_map="auto")
tokenizer = AutoTokenizer.from_pretrained(model_name)

messages = [
    {"role": "user", "content": "Convert the following HTML to WordprocessingML. <p>Hello, nice to meet you.</p>"}
]
inputs = tokenizer.apply_chat_template(messages, return_tensors="pt", add_generation_prompt=True).to(model.device)
outputs = model.generate(inputs, max_new_tokens=512, pad_token_id=tokenizer.eos_token_id)

print(tokenizer.decode(outputs[0][inputs.shape[1]:], skip_special_tokens=True))

Example Output

Input:

Convert the following HTML to WordprocessingML.
<p>Hello, nice to meet you.</p>

Output:

<?xml version="1.0" encoding="UTF-8"?>
<w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
  <w:body>
    <w:p><w:r><w:t>Hello, nice to meet you.</w:t></w:r></w:p>
    <w:sectPr/>
  </w:body>
</w:document>

Hardware and Software

  • Training Hardware: 4 NVIDIA H100-80GB GPUs

License

Apache-2.0

Contact

ai@namutech.co.kr

Downloads last month
-
Safetensors
Model size
8B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for namuai-x/MapleTree-1.0-8B

Finetuned
(441)
this model
Quantizations
1 model