code: def get_dataset(
      dataset_name: str,
      tokenizer: Any,
      nsamples: int = 128,
      seqlen: int = 2048,
      seed: int = 0,
      split: str = "train",
  ):
      """
      Get the dataset from the original paper of GPTQ
  
      Args:
          dataset_name (`str`):
              Dataset name. Available options are `['wikitext2', 'c4', 'ptb', 'c4-new', 'ptb_new']`.
          tokenizer (`Any`):
              Tokenizer of the model
          nsamples (`int`, defaults to `128`):
              Number of samples
          seqlen (`int`, defaults to `2048`):
              The sequence length of the model
          seed (`int`, defaults to `0`):
              Seed
          split (`str`, defaults to `train`):
              Split of the dataset. Can be either "train" or "validation"
      Returns:
          `List[Dict[str,torch.LongTensor]]`: The tokenized dataset.
      """
      random.seed(seed)
      np.random.seed(seed)
      torch.random.manual_seed(seed)
      get_dataset_map = {
          "wikitext2": get_wikitext2,
          "c4": get_c4,
          "c4-new": get_c4_new,
          "ptb": get_ptb,
          "ptb-new": get_ptb_new,
      }
      if split not in ["train", "validation"]:
          raise ValueError(
              f"The split need to be 'train' or 'validation' but found {split}"
          )
      if dataset_name not in get_dataset_map:
          raise ValueError(
              f"Expected a value in {list(get_dataset_map.keys())} but found {dataset_name}"
          )
      get_dataset_fn = get_dataset_map[dataset_name]
      return get_dataset_fn(
          tokenizer=tokenizer,
          nsamples=nsamples,
          seqlen=seqlen,
          split=split,
      )
  
file_path: optimum/optimum/gptq/data.py
imports: import random
  from typing import Any, Dict, List, Optional
  import numpy
  import torch
  from datasets import load_dataset
label_desc: Use image node_id 8 for calling a global function with example usage: get_dataset(dataset_name, tokenizer, nsamples, seqlen, seed, split) and returns: get_dataset_fn