amazingvince commited on
Commit
7537a46
·
verified ·
1 Parent(s): ca671b7

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. config.json +26 -79
  2. test.py +2 -2
config.json CHANGED
@@ -1,87 +1,34 @@
1
  {
2
- "vocab_size": 28776,
3
- "d_model": 1024,
4
- "d_kv": 64,
 
 
5
  "d_ff": 3072,
6
- "num_layers": 16,
 
 
 
 
 
 
 
 
 
 
 
 
7
  "num_decoder_layers": 16,
8
  "num_heads": 16,
9
  "num_key_value_heads": 4,
10
- "relative_attention_num_buckets": 48,
 
 
11
  "relative_attention_max_distance": 128,
12
- "dropout_rate": 0.0,
13
- "classifier_dropout": 0.0,
14
- "layer_norm_epsilon": 1e-06,
15
- "initializer_factor": 1.0,
16
- "feed_forward_proj": "gated-silu",
17
- "use_cache": true,
18
- "use_gqa": true,
19
- "dense_act_fn": "silu",
20
- "is_gated_act": true,
21
- "return_dict": true,
22
- "output_hidden_states": false,
23
- "output_attentions": false,
24
- "torchscript": false,
25
- "torch_dtype": null,
26
- "use_bfloat16": false,
27
- "tf_legacy_loss": false,
28
- "pruned_heads": {},
29
  "tie_word_embeddings": false,
30
- "chunk_size_feed_forward": 0,
31
- "is_encoder_decoder": true,
32
- "is_decoder": false,
33
- "cross_attention_hidden_size": null,
34
- "add_cross_attention": false,
35
- "tie_encoder_decoder": false,
36
- "max_length": 20,
37
- "min_length": 0,
38
- "do_sample": false,
39
- "early_stopping": false,
40
- "num_beams": 1,
41
- "num_beam_groups": 1,
42
- "diversity_penalty": 0.0,
43
- "temperature": 1.0,
44
- "top_k": 50,
45
- "top_p": 1.0,
46
- "typical_p": 1.0,
47
- "repetition_penalty": 1.0,
48
- "length_penalty": 1.0,
49
- "no_repeat_ngram_size": 0,
50
- "encoder_no_repeat_ngram_size": 0,
51
- "bad_words_ids": null,
52
- "num_return_sequences": 1,
53
- "output_scores": false,
54
- "return_dict_in_generate": false,
55
- "forced_bos_token_id": null,
56
- "forced_eos_token_id": null,
57
- "remove_invalid_values": false,
58
- "exponential_decay_length_penalty": null,
59
- "suppress_tokens": null,
60
- "begin_suppress_tokens": null,
61
- "architectures": [
62
- "T5ForConditionalGeneration"
63
- ],
64
- "finetuning_task": null,
65
- "id2label": {
66
- "0": "LABEL_0",
67
- "1": "LABEL_1"
68
- },
69
- "label2id": {
70
- "LABEL_0": 0,
71
- "LABEL_1": 1
72
- },
73
- "tokenizer_class": null,
74
- "prefix": null,
75
- "bos_token_id": null,
76
- "pad_token_id": 3,
77
- "eos_token_id": 2,
78
- "sep_token_id": null,
79
- "decoder_start_token_id": 3,
80
- "task_specific_params": null,
81
- "problem_type": null,
82
- "_name_or_path": "/workspace/nanoT5/logs/2024-10-20/18-25-17/checkpoint-pt-27000",
83
  "transformers_version": "4.46.0.dev0",
84
- "is_bf16": true,
85
- "model_type": "t5",
86
- "output_past": true
87
- }
 
1
  {
2
+ "_name_or_path": "pszemraj/tFINE-850m-24x24-1024ctx",
3
+ "architectures": [
4
+ "T5ForConditionalGeneration"
5
+ ],
6
+ "classifier_dropout": 0.0,
7
  "d_ff": 3072,
8
+ "d_kv": 64,
9
+ "d_model": 1024,
10
+ "decoder_start_token_id": 3,
11
+ "dense_act_fn": "silu",
12
+ "dropout_rate": 0.0,
13
+ "eos_token_id": 2,
14
+ "feed_forward_proj": "gated-silu",
15
+ "initializer_factor": 1.0,
16
+ "is_bf16": true,
17
+ "is_encoder_decoder": false,
18
+ "is_gated_act": true,
19
+ "layer_norm_epsilon": 1e-06,
20
+ "model_type": "t5",
21
  "num_decoder_layers": 16,
22
  "num_heads": 16,
23
  "num_key_value_heads": 4,
24
+ "num_layers": 16,
25
+ "output_past": true,
26
+ "pad_token_id": 3,
27
  "relative_attention_max_distance": 128,
28
+ "relative_attention_num_buckets": 48,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  "tie_word_embeddings": false,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  "transformers_version": "4.46.0.dev0",
31
+ "use_cache": true,
32
+ "use_gqa": true,
33
+ "vocab_size": 28776
34
+ }
test.py CHANGED
@@ -6,8 +6,8 @@ tokenizer = AutoTokenizer.from_pretrained("BEE-spoke-data/hf_slimpajama-6B-28672
6
  special_tokens_dict = {'additional_special_tokens': ['[R]', '[S]', '[X]', '[NTP]']}
7
  tokenizer.add_special_tokens(special_tokens_dict)
8
 
9
- model = AutoModelForSeq2SeqLM.from_pretrained("/workspace/nanoT5/logs/2024-10-20/18-25-17/checkpoint-pt-27000").to("cuda")
10
- prompt = "The "
11
  inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
12
  # Add decoder_input_ids
13
  # decoder_input_ids = torch.ones((inputs.input_ids.shape[0], 1), dtype=torch.long) * model.config.decoder_start_token_id
 
6
  special_tokens_dict = {'additional_special_tokens': ['[R]', '[S]', '[X]', '[NTP]']}
7
  tokenizer.add_special_tokens(special_tokens_dict)
8
 
9
+ model = AutoModelForSeq2SeqLM.from_pretrained("/workspace/nanoT5/logs/2024-10-20/18-25-17/amazingvince/ul3-base").to("cuda")
10
+ prompt = "[NTP] The "
11
  inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
12
  # Add decoder_input_ids
13
  # decoder_input_ids = torch.ones((inputs.input_ids.shape[0], 1), dtype=torch.long) * model.config.decoder_start_token_id