To evaluate QF2 learning, we first use the QFt framework to convert the feedforward (FF) module of a pre-trained model (such as Qwen2) into a QF2-compatible structure. Based on this architecture, we designed an eight-step experiment (see
Table 1) to assess whether QF2 can efficiently consolidate new knowledge, preserve existing information, support generalization, and enable continual learning.
3.1. QFt Experiment
We conducted our experiments using the open-source Qwen2.5-1.5B-Instruct model [
6], which is publicly available on HuggingFace. For the knowledge base, we used ChatGPT-4.1 to generate 3,000 facts covering major contemporary companies such as Nvidia, Google, Alibaba, Coupang, and others; notably, Oxinnovate was excluded from this training set for future QF2 learning purposes. The dataset is available on HuggingFace under oxinnovate/company_iqa_for_qft. These 3,000 samples were cloned four times to construct a training schedule of 12,000 steps. During training, Eq. (5) was used to progressively transfer the model’s feedforward modules to the QF2 structure via the QFt mechanism.
Due to GPU memory limitations (NVIDIA A6000), only layer 23 was fully QFt-converted, while the remaining layers retained the original Qwen2 architecture; specifically, layers 22, 23, and 24 were set as tunable, and all other parameters and structures were frozen throughout training. Model code is available at
https://github.com/oxinnovate/QFt, and the final QF2-1.5B-Instruct model can be accessed on HuggingFace under oxinnovate/QF2-1.5B-instruct.
As shown in
Figure 3 (left), after QFt-based conversion and training, the model reliably answers factual queries about well-known companies, responds with “Need more information” for unknown small companies such as Oxinnovate, and can correctly answer when explicit instructions are provided.
3.2. QF2 Experiment
Step 1: Initial Query without Knowledge
The model is queried about the CEO of Oxinnovate before any relevant knowledge is provided. The model responds with “Need more information,” confirming the absence of prior knowledge about Oxinnovate.
Step 2: Query with Explicit Instruction
The instruction “Qi is the CEO of Oxinnovate” is given together with the query. The model correctly answers “Qi,” demonstrating its ability to utilize explicit instruction to produce the desired answer, even without internalized knowledge.
Step 3: Existing Knowledge Query
A control query is issued about the CEO of a well-known company, such as Nvidia. The model answers “Jensen Huang,” indicating that its existing knowledge of major companies remains intact and functional.
Step 4: QF2-based Knowledge Consolidation
The knowledge “Qi is the CEO of Oxinnovate” is consolidated into the model’s weights using the QF2 update rule. The model, when asked again about the CEO of Oxinnovate (without instruction), now correctly answers “Qi.” This shows that new knowledge has been effectively learned.
Step 5: Post-Consolidation Query on Existing Knowledge
The model is queried again about the CEO of Nvidia. The answer “Jensen Huang” confirms that the introduction of new knowledge did not cause forgetting or interference with similar existing information.
Step 6: Generalization of New Knowledge
A related query (“The founder of Oxinnovate?”) is presented. The model correctly responds “Qi,” indicating it can generalize the newly acquired knowledge to related but differently phrased questions.
Step 7: Continual Knowledge Injection
Additional knowledge “Oxinnovate has one people” is injected using QF2 consolidation. The model is then asked, “How many people in Oxinnovate?” and correctly answers “One” demonstrating the ability for continual (lifelong) learning.
Step 8: Continuity of Knowledge Retention
Finally, the model is queried again about the CEO of Oxinnovate. The consistent answer “Qi” demonstrates that the model retains previously acquired knowledge even after subsequent injections of new information.
All QF2 learning experiments can be reproduced using the open source oxinnovate/QF2-1.5B-instruct model on HuggingFace
. The full QF2 learning codebase is available at https://github.com/oxinnovate/QF2. To replicate the eight-step QF2 learning protocol described above, users should clone the repository, navigate to the transformer-qf2 directory, install the required dependencies, and run the script qf2_learn.py. The QF2 learning pipeline can be executed on a single NVIDIA RTX 4090 GPU, while QFt-based training and large-scale experiments may require an A6000 or larger GPU due to increased memory demands.