srirag commited on
Commit
72a98ce
·
verified ·
1 Parent(s): 9650d5b

tor-simt-llama-3-8b-gpt4-de-en — git@unknown

Browse files
README.md ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - simultaneous-translation
4
+ - east
5
+ - ot-annotation
6
+ language: ['de', 'en']
7
+ license: mit
8
+ ---
9
+
10
+ # llama_3_8b_gpt4_de_en
11
+
12
+ Experiment `llama_3_8b_gpt4_de_en` from the *Teacher-Free Read/Write Annotation for Simultaneous
13
+ Machine Translation* project.
14
+
15
+ ## Recipe
16
+
17
+ - **Backbone:** `meta-llama/Meta-Llama-3-8B-Instruct`
18
+ - **Corpus:** `SiMT-De-En-660K`
19
+ - **Annotator:** `GPT-4 (shipped with SiMT-De-En-660K, unchanged)`
20
+ - **Criterion:** `gpt4-original` (τ = 0)
21
+ - **Latencies:** ['low', 'medium', 'high']
22
+
23
+ ## Files in this repo
24
+
25
+ - `config.yaml` — the exact experiment config that produced this run.
26
+ - `manifest.json` — git sha, hostname, GPUs, timestamps.
27
+ - `logs/` — per-stage stdout+stderr from `bin/run`.
28
+ - `eval/` — every landed eval-JSON cell (hypothesis, reference, AL, BLEU).
29
+ - `annotate/` — per-direction `matrices.jsonl` (divergence matrices) produced
30
+ by this backbone as annotator.
31
+ - `source_pool.json` — the corpus rows the matrices index into (`{index, source,
32
+ target, src_lang, tgt_lang, latency, source_chunks, target_chunks, _corpus}`).
33
+ Matrices are unjoinable without this file — records only carry `index`.
34
+ - SFT checkpoint (`*.safetensors` + tokenizer).
35
+
36
+ ## Reproduce
37
+
38
+ ```bash
39
+ git clone https://github.com/dipankarsrirag/simt-tor-26.git
40
+ cd simt-tor-26
41
+ cp .simtrc.example .simtrc # edit paths for your setup
42
+ bin/run configs/llama_3_8b_gpt4_de_en.yaml --ngpus N
43
+ ```
44
+
45
+ Git commit at time of run: `unknown`
chat_template.jinja ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ {% set loop_messages = messages %}{% for message in loop_messages %}{% set content = '<|start_header_id|>' + message['role'] + '<|end_header_id|>
2
+
3
+ '+ message['content'] | trim + '<|eot_id|>' %}{% if loop.index0 == 0 %}{% set content = bos_token + content %}{% endif %}{{ content }}{% endfor %}{% if add_generation_prompt %}{{ '<|start_header_id|>assistant<|end_header_id|>
4
+
5
+ ' }}{% endif %}
config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "LlamaForCausalLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 128000,
8
+ "dtype": "bfloat16",
9
+ "eos_token_id": 128009,
10
+ "head_dim": 128,
11
+ "hidden_act": "silu",
12
+ "hidden_size": 4096,
13
+ "initializer_range": 0.02,
14
+ "intermediate_size": 14336,
15
+ "max_position_embeddings": 8192,
16
+ "mlp_bias": false,
17
+ "model_type": "llama",
18
+ "num_attention_heads": 32,
19
+ "num_hidden_layers": 32,
20
+ "num_key_value_heads": 8,
21
+ "pad_token_id": null,
22
+ "pretraining_tp": 1,
23
+ "rms_norm_eps": 1e-05,
24
+ "rope_parameters": {
25
+ "rope_theta": 500000.0,
26
+ "rope_type": "default"
27
+ },
28
+ "tie_word_embeddings": false,
29
+ "transformers_version": "5.14.1",
30
+ "use_cache": false,
31
+ "vocab_size": 128258
32
+ }
config.yaml ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # llama_3_8b_gpt4_de_en — matched-annotator control for the falsifiable claim.
2
+ # Same 10K de-en rows from SiMT-De-En-660K but with the shipped GPT-4
3
+ # source_chunks/target_chunks (EAST's original annotator). Compare head-to-head
4
+ # with llama_3_8b_curated_de_en (10K de-en rows, our OT annotations).
5
+
6
+ tag: llama_3_8b_gpt4_de_en
7
+
8
+ backbone:
9
+ hf_id: meta-llama/Meta-Llama-3-8B-Instruct
10
+ local_path: ${SIMT_MODEL_BASE}/Meta-Llama-3-8B-Instruct
11
+ is_instruct: true
12
+ tokenizer_dir: ${SIMT_MODEL_BASE}/Meta-Llama-3-8B-Instruct-extended-v6
13
+
14
+ source_pool:
15
+ corpus: SiMT-De-En-660K
16
+ directions:
17
+ de-en: 10000
18
+ human_target_only: false
19
+ seed: 42
20
+
21
+ annotate:
22
+ annotator: GPT-4 (shipped with SiMT-De-En-660K, unchanged)
23
+ criterion: gpt4-original
24
+ tau: 0
25
+ top_k: 0
26
+ lookahead_k: 0
27
+ latency_bins: [low, medium, high]
28
+
29
+ sft_dataset:
30
+ merge_small_chunks: false
31
+ keep_collapsed_rows: false
32
+
33
+ train:
34
+ num_epochs: 2
35
+ per_device_batch_size: 2
36
+ grad_accum_steps: 8
37
+ learning_rate: 1.0e-5
38
+ warmup_steps: 200
39
+ eval_steps: 500
40
+ save_steps: 500
41
+ early_stopping_patience: 3
42
+ bf16: true
43
+ completion_only_loss: false
44
+
45
+ eval:
46
+ test_sets:
47
+ wmt15: [de-en]
48
+ wmt22: [de-en]
49
+ iwslt17: [de-en]
50
+ latencies: [low, low-medium, medium, medium-high, high]
51
+ n_sentences: -1
52
+ policy: check_argmax
53
+ mode: streaming
54
+
55
+ plot:
56
+ color: "#e6194B"
57
+ marker: D
58
+ label: Llama-3-8B w/ GPT-4 chunks
eval/iwslt17_stream_llama_3_8b_gpt4_de_en_check_argmax_high_de-en.json ADDED
The diff for this file is too large to render. See raw diff
 
eval/iwslt17_stream_llama_3_8b_gpt4_de_en_check_argmax_low-medium_de-en.json ADDED
The diff for this file is too large to render. See raw diff
 
eval/iwslt17_stream_llama_3_8b_gpt4_de_en_check_argmax_low_de-en.json ADDED
The diff for this file is too large to render. See raw diff
 
eval/iwslt17_stream_llama_3_8b_gpt4_de_en_check_argmax_medium-high_de-en.json ADDED
The diff for this file is too large to render. See raw diff
 
eval/iwslt17_stream_llama_3_8b_gpt4_de_en_check_argmax_medium_de-en.json ADDED
The diff for this file is too large to render. See raw diff
 
eval/wmt15_stream_llama_3_8b_gpt4_de_en_check_argmax_high_de-en.json ADDED
The diff for this file is too large to render. See raw diff
 
eval/wmt15_stream_llama_3_8b_gpt4_de_en_check_argmax_low-medium_de-en.json ADDED
The diff for this file is too large to render. See raw diff
 
eval/wmt15_stream_llama_3_8b_gpt4_de_en_check_argmax_low_de-en.json ADDED
The diff for this file is too large to render. See raw diff
 
eval/wmt15_stream_llama_3_8b_gpt4_de_en_check_argmax_medium-high_de-en.json ADDED
The diff for this file is too large to render. See raw diff
 
eval/wmt15_stream_llama_3_8b_gpt4_de_en_check_argmax_medium_de-en.json ADDED
The diff for this file is too large to render. See raw diff
 
eval/wmt22_stream_llama_3_8b_gpt4_de_en_check_argmax_high_de-en.json ADDED
The diff for this file is too large to render. See raw diff
 
eval/wmt22_stream_llama_3_8b_gpt4_de_en_check_argmax_low-medium_de-en.json ADDED
The diff for this file is too large to render. See raw diff
 
eval/wmt22_stream_llama_3_8b_gpt4_de_en_check_argmax_low_de-en.json ADDED
The diff for this file is too large to render. See raw diff
 
eval/wmt22_stream_llama_3_8b_gpt4_de_en_check_argmax_medium-high_de-en.json ADDED
The diff for this file is too large to render. See raw diff
 
eval/wmt22_stream_llama_3_8b_gpt4_de_en_check_argmax_medium_de-en.json ADDED
The diff for this file is too large to render. See raw diff
 
generation_config.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token_id": 128000,
3
+ "do_sample": true,
4
+ "eos_token_id": [
5
+ 128001,
6
+ 128009
7
+ ],
8
+ "max_length": 4096,
9
+ "temperature": 0.6,
10
+ "top_p": 0.9,
11
+ "transformers_version": "5.14.1"
12
+ }