Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import java.io.File
import dimwit.*
import dimwit.python.PyBridge.liftPyTensor
import me.shadaj.scalapy.py
import dimwit.stats.Uniform
import dimwit.stats.DiscreteUniform
import dimwit.hardware.DeviceBackend.GPU

object FineWebDataset:
Expand All @@ -28,7 +28,7 @@ object FineWebDataset:
val maxIdx = data.shape(Axis[Sample]) - batchSize - 1
val randomIndices = IndependentDistribution.fromUnivariate(
Shape1(Axis[Sample] -> batchSize),
Uniform(Tensor0(0), Tensor0(maxIdx))
DiscreteUniform(0, maxIdx)
).sample(key)
val shiftedIndices = randomIndices +! 1
val inputs = randomIndices.vmap(Axis[Sample])(startIndex =>
Expand Down
Loading