Downloads · 30 days
10
1% of all-time downloads
seihyun87/broken-model
broken-model is a text generation model from seihyun87. Use it when you need the model to write or continue text. It is set up for transformers.
Downloads · 30 days
10
1% of all-time downloads
All-time downloads
1.4K
Public
Parameters
8.2B
16.4 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors16.4 GB · 100%
From the Hugging Face model README
원본 모델: yunmorning/broken-model
이 모델로 /chat/completions API 서버를 실행할 수 없었다. 요청 시 다음 에러 반환:
{"message": "no configured chat prompt template; use non-chat endpoint instead"}
참고: /v1/completions (text completion)은 raw text prompt를 직접 사용하므로 chat template 없이도 정상 작동했다.
tokenizer_config.json에 chat_template 필드가 누락되어 있었다.
/chat/completions 엔드포인트는 messages 배열 (예: [{"role": "user", "content": "hello"}])을 모델이 이해하는 텍스트 형식으로 변환해야 한다. 이 변환 규칙이 chat_template에 정의되어 있으며, 이 필드가 없으면 서버가 messages를 모델 입력으로 변환할 수 없어 에러가 발생한다.
| 파일 | 필드 | 값 | 판단 |
|---|---|---|---|
config.json | architectures | ["Qwen3ForCausalLM"] | 정상 |
config.json | model_type | "qwen3" | 정상 |
config.json | vocab_size | 151936 | 정상 (Qwen3) |
config.json | num_hidden_layers | 36 | 정상 (Qwen3-8B) |
tokenizer_config.json | tokenizer_class | "Qwen2Tokenizer" | 허용 (Qwen3는 Qwen2Tokenizer 사용) |
tokenizer_config.json | chat_template | 누락 | 근본 원인 |
README.md | base_model | meta-llama/Meta-Llama-3.1-8B → Qwen/Qwen3-8B | 수정 (Optional — 추론에 영향 없지만 정확한 출처 기록) |
변경 파일: tokenizer_config.json
변경 사항: 공식 Qwen/Qwen3-8B의 chat_template 필드를 추가했다.
이 템플릿은 ChatML 형식(<|im_start|> / <|im_end|>)을 사용하며 다음을 지원한다:
<tool_call> / </tool_call>)<think> / </think>)추가로 README.md의 YAML frontmatter에서 base_model을 meta-llama/Meta-Llama-3.1-8B → Qwen/Qwen3-8B로 수정했다. 이 필드는 HuggingFace Hub UI에 표시되는 metadata이며 추론 동작에는 영향을 주지 않지만, 모델 출처를 정확히 기록하여 사용자 혼란을 방지한다.
수정 전 (/v1/chat/completions):
{"message": "no configured chat prompt template; use non-chat endpoint instead"}
수정 후 (/v1/chat/completions):
{
"choices": [{
"finish_reason": "stop",
"message": {
"content": "Hello! How can I assist you today?",
"reasoning_content": "Okay, the user just said \"hello\"...",
"role": "assistant"
}
}]
}