-
Notifications
You must be signed in to change notification settings - Fork 327
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b061969
commit 1983024
Showing
3 changed files
with
40 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# Dataset and Dataloader | ||
dataset: alpaca | ||
seed: null | ||
dataset: slimorca | ||
seed: 10 | ||
shuffle: True | ||
|
||
# Model Arguments | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Copyright (c) Meta Platforms, Inc. and affiliates. | ||
# All rights reserved. | ||
# | ||
# This source code is licensed under the BSD-style license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
from pathlib import Path | ||
|
||
import pytest | ||
|
||
from torchtune import datasets | ||
from torchtune.modules.tokenizer import Tokenizer | ||
|
||
ASSETS = Path(__file__).parent.parent.parent / "assets" | ||
|
||
|
||
class TestSlimOrcaDataset: | ||
@pytest.fixture | ||
def tokenizer(self): | ||
# m.model is a pretrained Sentencepiece model using the following command: | ||
# spm.SentencePieceTrainer.train('--input=<TRAIN_FILE> --model_prefix=m --vocab_size=2000') | ||
return Tokenizer.from_file(str(ASSETS / "m.model")) | ||
|
||
def test_slim_orca_dataset(self, tokenizer): | ||
dataset = datasets.get_dataset("slimorca", tokenizer=tokenizer) | ||
assert dataset |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters