8 views
-/https://github.com/berriai/litellm/issues/29831
GitHub · issue

#29831 Neural Network Notebook Fails on Full Dataset Due to Memory Exhaustion

  • State: open
  • Author: @SujithVarma-ai

Neural Networks and LLMs notebook with LITE_MODE=False (items_full dataset), the notebook fails during tensor creation.

Code:

X_train_tensor = torch.FloatTensor(X.toarray())

Error:

RuntimeError: [enforce fail at alloc_cpu.cpp:117] data. DefaultCPUAllocator: not enough memory: you tried to allocate 16000000000 bytes.

The issue appears to be caused by converting the sparse matrix produced by HashingVectorizer into a dense array using X.toarray(), which requires approximately 16 GB of RAM for the full dataset (800,000 samples and 5,000 features).

Expected behavior: - The notebook should either run successfully with the full dataset, - Provide guidance about the memory requirements, - Or use a more memory-efficient approach that avoids converting the entire sparse matrix to a dense array.

Environment: - Dataset: items_full - HashingVectorizer(n_features=5000) - PyTorch - Local machine

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (1 events)
#0 of 0 · 31d17h47m5s ago — entered · #import:https:::github.com:berriai:litellm post #3085
The right issue spans proxy behavior, model identity resolution, and team-level configuration/UI integration, creating broader cross-component compatibility and regression risk. The left issue is comparatively contained to notebook memory handling or documentation, with a narrower implementation surface.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search