LiqunMa commited on
Commit
0911327
·
verified ·
1 Parent(s): 69d5187

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +6 -1
README.md CHANGED
@@ -9,10 +9,15 @@ metrics:
9
  pipeline_tag: text-generation
10
  ---
11
 
 
 
 
 
 
12
 
13
  ## How to use
14
  Please download the code from [LiqunMa/FBI-LLM](https://github.com/LiqunMa/FBI-LLM) firstly
15
- ```
16
  from pathlib import Path
17
  from transformers import AutoTokenizer,LlamaConfig,LlamaForCausalLM, AutoModelForCausalLM
18
  from qat.replace_module import replace_with_learnable_binarylinear
 
9
  pipeline_tag: text-generation
10
  ---
11
 
12
+ ## FBI-LLM-7B
13
+ This work presents a Fully BInarized Large Language Model (FBI-LLM), demonstrating for the first time how to train a large-scale binary language model (not the ternary LLM like BitNet b1.58 from scratch to match the performance of its full-precision counterparts (e.g., FP16 or BF16) in transformer-based LLMs. It achieves this by employing an autoregressive distillation (AD) loss with maintaining equivalent model dimensions (130M, 1.3B, 7B) and training data volume as regular LLM pretraining, while delivering competitive results in terms of perplexity and task-specific effectiveness. Intriguingly, by analyzing the training trajectory, we find that the pretrained weight is not necessary for training binarized LLMs from scratch. This research encourages a new computational framework and may facilitate the future design of specialized hardware tailored for fully 1-bit LLMs. We make all models, code, and training dataset fully accessible and transparent to support further research.
14
+
15
+ ## Tokenizer
16
+ We use the same tokenizer as [meta-llama/Llama-2-7b-hf](https://huggingface.co/meta-llama/Llama-2-7b-hf)
17
 
18
  ## How to use
19
  Please download the code from [LiqunMa/FBI-LLM](https://github.com/LiqunMa/FBI-LLM) firstly
20
+ ```python
21
  from pathlib import Path
22
  from transformers import AutoTokenizer,LlamaConfig,LlamaForCausalLM, AutoModelForCausalLM
23
  from qat.replace_module import replace_with_learnable_binarylinear