Add model card
Browse files
README.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- ja
|
| 4 |
+
library_name: transformers
|
| 5 |
+
tags:
|
| 6 |
+
- lambda
|
| 7 |
+
- causal-lm
|
| 8 |
+
- custom-code
|
| 9 |
+
- pytorch
|
| 10 |
+
pipeline_tag: text-generation
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# lambda-1-360m-mid
|
| 14 |
+
|
| 15 |
+
lambda-1-360m-mid is an experimental Japanese language model based on [`lambda-1-360m-base`](https://huggingface.co/KeisukeMiyamoto/lambda-1-360m-base) and further pretrained on a synthetic Japanese textbook corpus.
|
| 16 |
+
|
| 17 |
+
All training code is publicly available at [KeisukeMiyamoto1324/lambda](https://github.com/KeisukeMiyamoto1324/lambda).
|
| 18 |
+
|
| 19 |
+
## Model Details
|
| 20 |
+
|
| 21 |
+
| Item | Value |
|
| 22 |
+
|---|---:|
|
| 23 |
+
| Parameters | 359.9M |
|
| 24 |
+
| Architecture | Decoder-only Transformer |
|
| 25 |
+
| Context length | 1,024 tokens |
|
| 26 |
+
| Tokenizer | Byte-level BPE |
|
| 27 |
+
| Vocabulary size | 65,536 |
|
| 28 |
+
| Layers | 32 |
|
| 29 |
+
| Hidden size | 960 |
|
| 30 |
+
| Attention heads | 15 |
|
| 31 |
+
| Key-value heads | 5 |
|
| 32 |
+
| FFN size | 4,096 |
|
| 33 |
+
|
| 34 |
+
## Training Data
|
| 35 |
+
|
| 36 |
+
The base model was pretrained on [`KeisukeMiyamoto/lambda-corpus`](https://huggingface.co/datasets/KeisukeMiyamoto/lambda-corpus).
|
| 37 |
+
|
| 38 |
+
This model was then further pretrained on [`KeisukeMiyamoto/SyntheticTextbook-jp`](https://huggingface.co/datasets/KeisukeMiyamoto/SyntheticTextbook-jp) for 20,480 steps.
|
| 39 |
+
|
| 40 |
+
## Usage
|
| 41 |
+
|
| 42 |
+
```bash
|
| 43 |
+
git clone https://github.com/KeisukeMiyamoto1324/lambda.git
|
| 44 |
+
cd lambda
|
| 45 |
+
python3 -m venv venv
|
| 46 |
+
source venv/bin/activate
|
| 47 |
+
pip3 install -r requirements.txt
|
| 48 |
+
|
| 49 |
+
python3 src/inference_base/inference_hf.py \
|
| 50 |
+
--model-dir "KeisukeMiyamoto/lambda-1-360m-mid" \
|
| 51 |
+
--prompt "人工知能とは" \
|
| 52 |
+
--max-new-tokens 64
|
| 53 |
+
```
|
| 54 |
+
|
| 55 |
+
## Limitations
|
| 56 |
+
|
| 57 |
+
This model is not instruction-tuned or safety-aligned. It may generate incorrect, biased, unsafe, or low-quality text.
|
| 58 |
+
|
| 59 |
+
The model was trained primarily on Japanese text and has not been evaluated on standard benchmarks.
|