RichardErkhov commited on
Commit
42100af
·
verified ·
1 Parent(s): 8e30a06

uploaded readme

Browse files
Files changed (1) hide show
  1. README.md +98 -0
README.md ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Quantization made by Richard Erkhov.
2
+
3
+ [Github](https://github.com/RichardErkhov)
4
+
5
+ [Discord](https://discord.gg/pvy7H8DZMG)
6
+
7
+ [Request more models](https://github.com/RichardErkhov/quant_request)
8
+
9
+
10
+ phi-pl-2_7B-v_0_1 - bnb 4bits
11
+ - Model creator: https://huggingface.co/teddy-f-47/
12
+ - Original model: https://huggingface.co/teddy-f-47/phi-pl-2_7B-v_0_1/
13
+
14
+
15
+
16
+
17
+ Original model description:
18
+ ---
19
+ license: mit
20
+ base_model: microsoft/phi-2
21
+ tags:
22
+ - generated_from_trainer
23
+ model-index:
24
+ - name: phi-2-pl-v_0_1
25
+ results: []
26
+ ---
27
+
28
+ # phi-2-pl-v_0_1
29
+
30
+ This model is based on [microsoft/phi-2](https://huggingface.co/microsoft/phi-2). It was trained from scratch on the 20231201 Polish Wikipedia dump.
31
+
32
+ ## Model description
33
+
34
+ The model was trained for a context length of 2048 tokens.
35
+
36
+ ## Intended uses & limitations
37
+
38
+ The model is intended for research purposes only. It may generate fictitious, incorrect, unethical, or biased texts. At its current state, it is not suitable for production purposes.
39
+
40
+ Example:
41
+ ```
42
+ tokenizer = AutoTokenizer.from_pretrained(
43
+ model_name, trust_remote_code=True, use_fast=True
44
+ )
45
+ model = AutoModelForCausalLM.from_pretrained(
46
+ model_name, vocab_size=len(tokenizer), attn_implementation="flash_attention_2",
47
+ trust_remote_code=True, torch_dtype=torch.bfloat16, device_map="auto"
48
+ )
49
+ model.eval()
50
+
51
+ generation_config = GenerationConfig.from_pretrained(
52
+ model_name, do_sample=False, repetition_penalty=1.5,
53
+ min_new_tokens=1, max_new_tokens=128
54
+ )
55
+
56
+ test_input = tokenizer("Wrocław to polski miasto. Wrocław jest ", return_tensors='pt').to(torch.device('cuda'))
57
+ test_output = model.generate(**test_input, generation_config=generation_config)
58
+ test_preds = tokenizer.batch_decode(sequences=test_output, skip_special_tokens=True, clean_up_tokenization_spaces=True)
59
+ print(test_preds)
60
+ ```
61
+
62
+ ## Training and evaluation data
63
+
64
+ The 20231201 Polish Wikipedia dump.
65
+
66
+ ## Training procedure
67
+
68
+ ### Training environment
69
+
70
+ - GPU: 1 x A100X (80GB)
71
+
72
+ ### Training hyperparameters
73
+
74
+ The following hyperparameters were used during training:
75
+ - learning_rate: 0.0002
76
+ - num_devices: 1
77
+ - train_batch_size: 8
78
+ - gradient_accumulation_steps: 1
79
+ - optimizer: Adam with betas=(0.9,0.98) and epsilon=1e-07
80
+ - lr_scheduler_type: cosine
81
+ - lr_scheduler_warmup_ratio: 0.1
82
+ - num_epochs: 1
83
+ - precision: bf16
84
+ - seed: 42
85
+
86
+ ### Training results
87
+
88
+ - runtime: 1mo 3d 9h 40m 16s
89
+ - train_loss: 2.983
90
+
91
+ ### Framework versions
92
+
93
+ - Transformers 4.37.1
94
+ - Pytorch 2.1.2
95
+ - Datasets 2.16.1
96
+ - Tokenizers 0.15.1
97
+
98
+