Downloads · 30 days
18
5% of all-time downloads
HachiML/myBit-Llama2-jp-127M-4
myBit-Llama2-jp-127M-4 is a text generation model from HachiML. Use it when you need the model to write or continue text. It is set up for transformers.
should probably proofread and complete it, then remove this comment. --
Downloads · 30 days
18
5% of all-time downloads
All-time downloads
371
Public
Parameters
128M
10.7 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors511 MB · 99%
From the Hugging Face model README
This model has 127M parameters.
The model is a pre-trained Bit-Llama2 of Parameters with only 1 epoch on a Japanese dataset.
The dataset used is range3/wiki40b-ja.
Github: BitNet-b158
More information about this model can be found in the following pages:
!pip install mybitnet==0.2.3
!pip install -U accelerate transformers==4.38.2
!pip install torch
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
model_name = "HachiML/myBit-Llama2-jp-127M-4"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.bfloat16, device_map="auto", trust_remote_code=True)
print(model)
prompt = "昔々あるところに、"
input_ids = tokenizer.encode(
prompt,
return_tensors="pt"
)
tokens = model.generate(
input_ids.to(device=model.device),
max_new_tokens=128,
)
out = tokenizer.decode(tokens[0], skip_special_tokens=True)
print(out)
More information needed
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 4.8696 | 0.05 | 2000 | 3.8588 |
| 3.7027 | 0.1 | 4000 | 3.6106 |
| 3.5648 | 0.15 | 6000 | 3.5014 |
| 3.448 | 0.2 | 8000 | 3.4153 |
| 3.3884 | 0.25 | 10000 | 3.3650 |
| 3.3462 | 0.29 | 12000 | 3.3280 |
| 3.3155 | 0.34 | 14000 | 3.3053 |
| 3.2932 | 0.39 | 16000 | 3.2891 |
| 3.2762 | 0.44 | 18000 | 3.2673 |
| 3.2594 | 0.49 | 20000 | 3.2533 |
| 3.2432 | 0.54 | 22000 | 3.2398 |
| 3.2286 | 0.59 | 24000 | 3.2186 |
| 3.2083 | 0.64 | 26000 | 3.1957 |
| 3.1867 | 0.69 | 28000 | 3.1769 |
| 3.1676 | 0.74 | 30000 | 3.1568 |
| 3.14 | 0.79 | 32000 | 3.1286 |
| 3.114 | 0.83 | 34000 | 3.1006 |
| 3.0848 | 0.88 | 36000 | 3.0696 |
| 3.0511 | 0.93 | 38000 | 3.0301 |
| 3.005 | 0.98 | 40000 | 2.9790 |