Views
No views yet
nori-sdc/Qwen3.5-4B-JP-YUA1 is a Japanese instruction-tuned merged model based on Qwen/Qwen3.5-4B.nori-sdc/Llama-3-ELYZA-JP-YUA-1-GGUF. The training data and methodology are essentially the same; the base model was changed from an 8B Llama-3 derivative to Qwen3.5-4B, roughly halving the parameter count and the on-disk size. This makes on-device execution on a smartphone practical (see below).Qwen/Qwen3.5-4B
Developer: Noriyuki Sakai / 驟剃コ・邏荵・(nori-sdc)<think>
</think>
<the actual answer>Qwen/Qwen3.5-4B is a thinking-capable model, and its chat template emits an
empty <think></think> pair when thinking is disabled. The same output was
confirmed on the unmodified base model under identical raw prompting, so
callers should treat this as normal Qwen3.5 behavior.think: false in the request. The answer then arrives in message.content
and message.thinking stays empty.1curl http://localhost:11434/api/chat -d '{
2 "model": "hf.co/nori-sdc/Qwen3.5-4B-JP-YUA1-GGUF:Q6_K",
3 "messages": [{"role": "user", "content": "..."}],
4 "think": false,
5 "stream": false
6}'think: false, some Ollama versions route the whole answer into the
thinking field and leave content empty.<think> ... </think> block from the generated text,
or render the chat template with enable_thinking=false and drop the empty
pair before display. Stripping is a two-line operation and is what the author's
iOS application does.stop: "<think>". Because the model emits <think> as its very
first token, that stop sequence terminates generation immediately and yields an
empty response.Modelfile. It supplies
the ChatML turn markers explicitly and avoids the <think> stop sequence:FROM ./Qwen3.5-4B-JP-YUA1_q6_k.gguf
TEMPLATE """{{- if .System }}<|im_start|>system
{{ .System }}<|im_end|>
{{ end }}{{- range .Messages }}<|im_start|>{{ .Role }}
{{ .Content }}<|im_end|>
{{ end }}<|im_start|>assistant
"""
PARAMETER stop "<|im_end|>"
PARAMETER stop "<|im_start|>"
PARAMETER temperature 0.2笏娯楳笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏・笏・ iOS application (Swift / SwiftUI) 笏・笏・ 笏・笏・ 笏娯楳笏笏笏笏笏笏笏笏笏笏笏笏笏・ 笏娯楳笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏・ 笏・笏・ 笏・Chat UI 笏や楳笏笏笏笏笆カ笏・Retrieval layer 笏・ 笏・笏・ 笏披楳笏笏笏笏笏笏笏笏笏笏笏笏笏・ 笏・ (local RAG index) 笏・ 笏・笏・ 笆イ 笏披楳笏笏笏笏笏笏笏笏笏ャ笏笏笏笏笏笏笏笏笏笏笏・ 笏・笏・ 笏・ 笏・context 笏・笏・ 笏・ 笆シ 笏・笏・ 笏娯楳笏笏笏笏笏笏エ笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏・笏・笏・ 笏・Inference engine (llama.cpp, GGUF Q6_K) 笏・笏・笏・ 笏・running on the device's own hardware 笏・笏・笏・ 笏披楳笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏・笏・笏・ 笏・笏・ 笏娯楳笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏・笏・笏・ 笏・Optional speech output (external API) 笏・笏・笏・ 笏披楳笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏・笏・笏披楳笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏笏・```
Key points:
1. **The model file is bundled with, or side-loaded into, the application** and loaded from local storage. There is no model download at inference time.
2. **Inference is performed locally** via a `llama.cpp`-based engine compiled for arm64. No prompt or response text leaves the device during generation.
3. **A small retrieval index (RAG) accompanies the model.** Reference material relevant to entrance exam consultation is embedded and stored alongside the model; at query time the retrieval layer selects relevant passages and injects them into the prompt as 縲占ウ・侭縲・(reference material). This keeps the model grounded on curated content rather than relying only on parametric memory.
4. **The system prompt instructs the model to answer from the supplied reference material**, and to state plainly that the information is not available rather than guessing when the material does not cover the question.
5. **Speech synthesis is optional and separate** from the language model. It is handled by an external service and is not required for text-based use.
### Measured performance
Measured on an iPhone 16 Pro Max (8 GB RAM), Q6_K, retrieval disabled, with the model loaded from the app''s Documents directory:
| Prompt length | Generated tokens | Generation time | Speed |
|---|---|---|---|
| 16 tokens | 20 | 2.02 s | 9.90 tok/s |
| 48 tokens | 33 | 3.28 s | 10.06 tok/s |
| 93 tokens | 44 | 4.45 s | 9.90 tok/s |
| 139 tokens | 65 | 6.55 s | 9.92 tok/s |
Generation throughput stayed at roughly **10 tokens per second** and was essentially flat as the prompt grew across this range. For a spoken-response use case this is comfortably faster than natural speech, so generation keeps ahead of text-to-speech playback rather than making the user wait.
### Practical notes for on-device use
- Q6_K at 4B is a reasonable ceiling for comfortable smartphone use. Lower quantizations (Q4_K_M and below) reduce the memory footprint further at some cost in Japanese fluency.
- Keep the context window modest. Long contexts dominate memory use on mobile far more than the weights do.
- The retrieval index should be kept small and domain-specific; a compact index preserves most of the practical benefit at a fraction of the storage cost.
*The application is described here for reference only and is not distributed.*
## Training Data
The model was trained using Japanese-language data provided with the cooperation of **Saika Gakusha**.
### Data Categories
The training data included:
- Q&A pairs
- consultation dialogues
- examples of statements of purpose
- guidance on points to be careful about in interviews
- study planning materials
### Data Language
- Japanese only
### Personal Information
According to the developer, the training data does **not** contain personal information.
### Data Availability
The training data itself is **not publicly released**.
## Training
This model was developed through instruction tuning and LoRA fine-tuning, and is released as a merged model.
### Frameworks and Libraries
- PyTorch
- Hugging Face Transformers
- Hugging Face Datasets
- PEFT (LoRA)
- Unsloth
- llama.cpp (GGUF conversion and quantization)
### Training Configuration
- **LoRA:** rank 64, alpha 128, applied to seven projections (q, k, v, o, gate, up, down)
- `embed_tokens` and `lm_head` were **not** trained
- **Two-stage curriculum:**
1. Corpus stage 窶・70 documents, lr 1e-4, 2 epochs
2. Q&A stage 窶・78 Q&A pairs, lr 2e-4, 1 epoch, batch 8 (continued from the stage-1 adapter)
- **Precision:** fp16 was used explicitly. Although the training GPU supports bf16, Qwen3.5 proved numerically unstable in bf16 in this setup and produced NaN losses; forcing fp16 resolved it.
- **Chat template:** the model's built-in ChatML template was used as-is.
- **Final eval loss:** 1.29 (Q&A stage)
### Environment
- NVIDIA GeForce RTX 5090
- Windows Server 2025
- WSL2 Ubuntu
- Conda
## Evaluation
The model was evaluated through an exhaustive evaluation process using all available Q&A training data.
In this evaluation workflow, the model generated answers for the full Q&A dataset, and the outputs were then evaluated and ranked by an LLM-based evaluation program prepared by the developer.
### Observed Improvements
Compared with the base model, this model showed improved specialization in knowledge related to university entrance exam preparation.
### Limitations
- This is a 4B-class model and therefore has inherent capacity limitations. It is smaller than the 8B predecessor, and users who prioritize raw breadth of general knowledge over on-device portability may prefer the earlier release.
- The tuning process was conducted in an RTX 5090-based environment, which imposes practical limits.
- The model reflects information available up to **July 2026** and may not reflect later changes or developments.
- Older or memory-constrained smartphones may not be able to run this model comfortably.
## Safety and Usage Notes
This model is intended for **reference and advisory use only**. Final decisions should always be made by a human.
This model should not be used as the sole basis for school selection or life decisions.
### Not Recommended For
- definitive medical judgments
- definitive legal judgments
- deterministic school or career decisions based on potentially incorrect information
- discriminatory, harmful, or abusive use
### Use by Minors
This model is expected to be used by minors, including high school students. Human review and adult or educator support are recommended when the model is used for important educational or life decisions.
## Acknowledgements
Special thanks to **Saika Gakusha / 謇崎庄蟄ク闊・* for their cooperation and data provision in the development of this model.
This model is built upon [Qwen/Qwen3.5-4B](https://huggingface.co/Qwen/Qwen3.5-4B) by **Alibaba Cloud / Qwen Team**. Training used [Unsloth](https://github.com/unslothai/unsloth), and GGUF conversion and quantization used [llama.cpp](https://github.com/ggml-org/llama.cpp). We gratefully acknowledge these teams for their contributions to the open LLM community.
## Contact / Related Link
**Developer:** Noriyuki Sakai / 驟剃コ・邏荵・(nori-sdc)
- YouTube: <https://www.youtube.com/channel/UCjLYssqhbwkrRSPBOyO_xLw>
## License Notice
This model is derived from `Qwen/Qwen3.5-4B`, which is released under the **Apache License 2.0**.
This model is therefore also released under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). See the `LICENSE` file in this repository for the full terms.