shards
list
version
int64
[{"column_encodings":["uint16"],"column_names":["input_ids"],"column_sizes":[null],"compression":nul(...TRUNCATED)
2

Mosaic format for filtered starcoder dataset to train Malaysian LLM

This repository is to store dataset shards using mosaic format.

  1. prepared at https://github.com/malaysia-ai/dedup-text-dataset/blob/main/pretrain-llm/combine-starcoder.ipynb
  2. using tokenizer https://huggingface.co/malaysia-ai/bpe-tokenizer
  3. 4096 context length.

how-to

  1. git clone,
git lfs clone https://huggingface.co/datasets/malaysia-ai/mosaic-starcoder-filtered
  1. load it,
from streaming import LocalDataset
import numpy as np
from streaming.base.format.mds.encodings import Encoding, _encodings

class UInt16(Encoding):
    def encode(self, obj) -> bytes:
        return obj.tobytes()

    def decode(self, data: bytes):
        return np.frombuffer(data, np.uint16)

_encodings['uint16'] = UInt16

dataset = LocalDataset('mosaic-starcoder-filtered')
len(dataset)
Downloads last month
87
Edit dataset card