At blueqat, we built a small language model from scratch. Its name is "nobidog". Currently, we are using "nobidog1b" within the company, which has approximately 1.2 billion parameters.
Many current language models are based on models released by other companies, which are then fine-tuned for their specific use cases. We chose not to do that this time. We trained it from a blank state using only Japanese text. We did not use any weights from other companies' models.
Why build from scratch?
The reason is simple: we wanted to verify whether we could build it all the way through ourselves.
If you just want to use a language model, there are plenty of options. However, if you truly want to understand what is happening inside, you have no choice but to grow one from scratch by collecting articles and training it yourself. How much computation is required, and where will you hit snags? There is much that you cannot know without actually building it.
For training, we used publicly available Japanese web articles and the Japanese Wikipedia. We filtered these ourselves, removed duplicates, and processed them for training. We also built our own tokenizer to split articles into fine units and wrote our own training programs. Furthermore, all training was performed using our company's GPUs.
Starting small and gradually expanding
We started with a very small model. We verified that it worked, made it slightly larger, and verified it again. Through this repetition, we eventually reached the current 1B class. About one month has passed since development began, and it took approximately 16 days to train the largest model.
The GPUs we are using are not the latest models. Because of this, we cannot perform the computation optimizations that are standard with the latest GPUs. We had to devise ways to increase the precision of only some computations to prevent numbers from overflowing. Given our limited equipment, we explored how far we could go. This was also one of the challenges in this project.
What made us laugh after building it from scratch
When building from scratch, you encounter unexpected behaviors in unexpected places.
The funniest incident involved greetings. When we said "konchi wa" to the trained model, it started continuing someone else's blog post with, "Konchi wa, I ordered a new smartphone case the other day..." At another time, it even started talking about installing Windows XP.
The cause was that the Q&A data used for fine-tuning contained almost no greetings. The model considered "konchi wa" to be the start of a text rather than the beginning of a conversation. After we added examples of greetings and small talk to the training data, it began responding properly with "Hello! Is there anything I can help you with?"
There were other instances where rare kanji like "𠮷 (tsuchi-yoshi)" and "𫚕 (buri)" appeared as garbled symbols. These characters are formed by combining fine components. Because we streamed the answer component by component, the incomplete state before they assembled was being displayed. Each of these mundane stumbling blocks was something we only discovered by actually building it.
It is more usable than expected
As for the actual content, to be honest, it is much more usable than we expected.
For example, if you ask, "Please explain the mechanism of VQE simply," it returns a reasonable answer: "Decompose the Hamiltonian into a sum of Pauli operators, measure the expectation value of each, and minimize the energy through classical optimization." Even a small model is useful in situations where basic quantum computing terminology needs to be explained.
Of course, it makes mistakes. It is not a substitute for large models or experts. However, because it is small, it runs lightly, quickly, and cheaply. It runs on local GPUs and can be used without sending data outside. We feel that this ease of use and low cost are the strengths inherent to small models.
We are currently running benchmarks to show the performance with numbers. We are comparing it under the same conditions as other models of a similar size in standard Japanese evaluations. We will introduce the results again when they are available.
It is already being used within the company
nobidog1b has already begun being provided on our company's servers to a limited number of internal users. It is not yet available publicly, but we are in a stage of daily use while fixing issues as we encounter them.
Next is 7B, and then a model for quantum computing
Our next goal is to create a model that assists in performing quantum calculations faster and more cheaply. There are many situations where it would be helpful to have a lightweight model that runs locally beside you when thinking about quantum algorithms and circuits. We aim to build such an efficient model.
Our next target is the 7B class (approximately 7 billion parameters). Reaching this size makes it difficult to train from scratch using only our current company GPUs. Therefore, we are considering methods such as continuing training based on publicly available Japanese models and utilizing external computing resources.
By building it from scratch, the language model has shifted from something "others create for us to use" to something "we can grow ourselves." Starting small and gradually expanding—just like quantum computers—we feel that this field is most interesting when you touch it with your own hands.