winglian commited on
Commit
c10563c
1 Parent(s): 37c037c

fix broken linting (#1541)

Browse files

* chore: lint

* include examples in yaml check

* mistral decided to gate their models...

* more mistral models that were gated

.github/workflows/lint.yml CHANGED
@@ -7,6 +7,7 @@ on:
7
  - 'requirements.txt'
8
  - '.github/workflows/*.yml'
9
  - "*.md"
 
10
  workflow_dispatch:
11
 
12
  jobs:
 
7
  - 'requirements.txt'
8
  - '.github/workflows/*.yml'
9
  - "*.md"
10
+ - "examples/**/*.y[a]?ml"
11
  workflow_dispatch:
12
 
13
  jobs:
examples/mistral/mixtral_22.yml CHANGED
@@ -14,11 +14,13 @@ unfrozen_parameters:
14
  - model.layers.4[4-9]+.block_sparse_moe.experts
15
  - model.layers.5[0-5]+.block_sparse_moe.gate
16
  - model.layers.5[0-5]+.block_sparse_moe.experts
17
-
18
  model_config:
19
  output_router_logits: true
20
 
21
- DATA_STUFF_HERE
 
 
22
  output_dir: ./out
23
 
24
  sequence_len: 8000
 
14
  - model.layers.4[4-9]+.block_sparse_moe.experts
15
  - model.layers.5[0-5]+.block_sparse_moe.gate
16
  - model.layers.5[0-5]+.block_sparse_moe.experts
17
+
18
  model_config:
19
  output_router_logits: true
20
 
21
+ datasets:
22
+ - path: yahma/alpaca-cleaned
23
+ type: alpaca
24
  output_dir: ./out
25
 
26
  sequence_len: 8000
tests/e2e/patched/test_mixtral_samplepack.py CHANGED
@@ -30,7 +30,7 @@ class TestMixtral(unittest.TestCase):
30
  cfg = DictDefault(
31
  {
32
  "base_model": "hf-internal-testing/Mixtral-tiny",
33
- "tokenizer_config": "mistralai/Mixtral-8x7B-v0.1",
34
  "flash_attention": True,
35
  "sample_packing": True,
36
  "sequence_len": 2048,
@@ -74,7 +74,7 @@ class TestMixtral(unittest.TestCase):
74
  cfg = DictDefault(
75
  {
76
  "base_model": "hf-internal-testing/Mixtral-tiny",
77
- "tokenizer_config": "mistralai/Mixtral-8x7B-v0.1",
78
  "flash_attention": True,
79
  "sample_packing": True,
80
  "sequence_len": 2048,
 
30
  cfg = DictDefault(
31
  {
32
  "base_model": "hf-internal-testing/Mixtral-tiny",
33
+ "tokenizer_config": "LoneStriker/Mixtral-8x7B-v0.1-HF",
34
  "flash_attention": True,
35
  "sample_packing": True,
36
  "sequence_len": 2048,
 
74
  cfg = DictDefault(
75
  {
76
  "base_model": "hf-internal-testing/Mixtral-tiny",
77
+ "tokenizer_config": "LoneStriker/Mixtral-8x7B-v0.1-HF",
78
  "flash_attention": True,
79
  "sample_packing": True,
80
  "sequence_len": 2048,
tests/e2e/patched/test_model_patches.py CHANGED
@@ -22,7 +22,7 @@ class TestModelPatches(unittest.TestCase):
22
  cfg = DictDefault(
23
  {
24
  "base_model": "hf-internal-testing/Mixtral-tiny",
25
- "tokenizer_config": "mistralai/Mixtral-8x7B-v0.1",
26
  "flash_attention": True,
27
  "sample_packing": True,
28
  "sequence_len": 2048,
 
22
  cfg = DictDefault(
23
  {
24
  "base_model": "hf-internal-testing/Mixtral-tiny",
25
+ "tokenizer_config": "LoneStriker/Mixtral-8x7B-v0.1-HF",
26
  "flash_attention": True,
27
  "sample_packing": True,
28
  "sequence_len": 2048,
tests/e2e/test_mixtral.py CHANGED
@@ -33,7 +33,7 @@ class TestMixtral(unittest.TestCase):
33
  cfg = DictDefault(
34
  {
35
  "base_model": "hf-internal-testing/Mixtral-tiny",
36
- "tokenizer_config": "mistralai/Mixtral-8x7B-v0.1",
37
  "flash_attention": True,
38
  "sequence_len": 1024,
39
  "load_in_4bit": True,
@@ -87,7 +87,7 @@ class TestMixtral(unittest.TestCase):
87
  cfg = DictDefault(
88
  {
89
  "base_model": "hf-internal-testing/Mixtral-tiny",
90
- "tokenizer_config": "mistralai/Mixtral-8x7B-v0.1",
91
  "flash_attention": False,
92
  "sequence_len": 1024,
93
  "load_in_4bit": True,
@@ -141,7 +141,7 @@ class TestMixtral(unittest.TestCase):
141
  cfg = DictDefault(
142
  {
143
  "base_model": "hf-internal-testing/Mixtral-tiny",
144
- "tokenizer_config": "mistralai/Mixtral-8x7B-v0.1",
145
  "flash_attention": True,
146
  "sequence_len": 1024,
147
  "adapter": "lora",
@@ -198,7 +198,7 @@ class TestMixtral(unittest.TestCase):
198
  cfg = DictDefault(
199
  {
200
  "base_model": "hf-internal-testing/Mixtral-tiny",
201
- "tokenizer_config": "mistralai/Mixtral-8x7B-v0.1",
202
  "flash_attention": False,
203
  "sequence_len": 1024,
204
  "adapter": "lora",
@@ -255,7 +255,7 @@ class TestMixtral(unittest.TestCase):
255
  cfg = DictDefault(
256
  {
257
  "base_model": "hf-internal-testing/Mixtral-tiny",
258
- "tokenizer_config": "mistralai/Mixtral-8x7B-v0.1",
259
  "flash_attention": True,
260
  "sequence_len": 1024,
261
  "val_set_size": 0.1,
 
33
  cfg = DictDefault(
34
  {
35
  "base_model": "hf-internal-testing/Mixtral-tiny",
36
+ "tokenizer_config": "LoneStriker/Mixtral-8x7B-v0.1-HF",
37
  "flash_attention": True,
38
  "sequence_len": 1024,
39
  "load_in_4bit": True,
 
87
  cfg = DictDefault(
88
  {
89
  "base_model": "hf-internal-testing/Mixtral-tiny",
90
+ "tokenizer_config": "LoneStriker/Mixtral-8x7B-v0.1-HF",
91
  "flash_attention": False,
92
  "sequence_len": 1024,
93
  "load_in_4bit": True,
 
141
  cfg = DictDefault(
142
  {
143
  "base_model": "hf-internal-testing/Mixtral-tiny",
144
+ "tokenizer_config": "LoneStriker/Mixtral-8x7B-v0.1-HF",
145
  "flash_attention": True,
146
  "sequence_len": 1024,
147
  "adapter": "lora",
 
198
  cfg = DictDefault(
199
  {
200
  "base_model": "hf-internal-testing/Mixtral-tiny",
201
+ "tokenizer_config": "LoneStriker/Mixtral-8x7B-v0.1-HF",
202
  "flash_attention": False,
203
  "sequence_len": 1024,
204
  "adapter": "lora",
 
255
  cfg = DictDefault(
256
  {
257
  "base_model": "hf-internal-testing/Mixtral-tiny",
258
+ "tokenizer_config": "LoneStriker/Mixtral-8x7B-v0.1-HF",
259
  "flash_attention": True,
260
  "sequence_len": 1024,
261
  "val_set_size": 0.1,
tests/prompt_strategies/test_alpaca.py CHANGED
@@ -27,7 +27,9 @@ def fixture_alpaca_dataset():
27
  @pytest.fixture(name="tokenizer")
28
  def fixture_tokenizer():
29
  # pylint: disable=all
30
- tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-v0.1")
 
 
31
  tokenizer.add_special_tokens(
32
  {
33
  "eos_token": AddedToken(
 
27
  @pytest.fixture(name="tokenizer")
28
  def fixture_tokenizer():
29
  # pylint: disable=all
30
+ tokenizer = AutoTokenizer.from_pretrained(
31
+ "casperhansen/mistral-7b-instruct-v0.1-awq"
32
+ )
33
  tokenizer.add_special_tokens(
34
  {
35
  "eos_token": AddedToken(
tests/prompt_strategies/test_raw_io.py CHANGED
@@ -43,7 +43,9 @@ def fixture_sharegpt_dataset():
43
 
44
  @pytest.fixture(name="tokenizer")
45
  def fixture_tokenizer():
46
- tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-v0.1")
 
 
47
  tokenizer.add_tokens(
48
  [
49
  AddedToken("<eot>", rstrip=False, lstrip=False, normalized=False),
 
43
 
44
  @pytest.fixture(name="tokenizer")
45
  def fixture_tokenizer():
46
+ tokenizer = AutoTokenizer.from_pretrained(
47
+ "casperhansen/mistral-7b-instruct-v0.1-awq"
48
+ )
49
  tokenizer.add_tokens(
50
  [
51
  AddedToken("<eot>", rstrip=False, lstrip=False, normalized=False),
tests/prompt_strategies/test_sharegpt.py CHANGED
@@ -96,7 +96,9 @@ def fixture_multi_role_dataset():
96
 
97
  @pytest.fixture(name="tokenizer")
98
  def fixture_tokenizer():
99
- tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-v0.1")
 
 
100
  tokenizer.add_special_tokens(
101
  {
102
  "eos_token": AddedToken(
 
96
 
97
  @pytest.fixture(name="tokenizer")
98
  def fixture_tokenizer():
99
+ tokenizer = AutoTokenizer.from_pretrained(
100
+ "casperhansen/mistral-7b-instruct-v0.1-awq"
101
+ )
102
  tokenizer.add_special_tokens(
103
  {
104
  "eos_token": AddedToken(
tests/test_prompt_tokenizers.py CHANGED
@@ -454,7 +454,9 @@ class OrpoTokenizationTest(unittest.TestCase):
454
 
455
  def setUp(self) -> None:
456
  # pylint: disable=duplicate-code
457
- tokenizer = LlamaTokenizer.from_pretrained("mistralai/Mistral-7B-v0.1")
 
 
458
  tokenizer.add_special_tokens(
459
  {
460
  "eos_token": AddedToken(
 
454
 
455
  def setUp(self) -> None:
456
  # pylint: disable=duplicate-code
457
+ tokenizer = LlamaTokenizer.from_pretrained(
458
+ "casperhansen/mistral-7b-instruct-v0.1-awq"
459
+ )
460
  tokenizer.add_special_tokens(
461
  {
462
  "eos_token": AddedToken(