outgreen commited on
Commit
40a5d5d
·
verified ·
1 Parent(s): 2b7f382

Upload 2 files

Browse files
hf_inference_resnet_standalone.py ADDED
The diff for this file is too large to render. See raw diff
 
requirements.txt ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ============================================================================
2
+ # Requirements for NeuroLattice Standalone Inference Scripts
3
+ # ============================================================================
4
+ # Python Version: 3.12.7
5
+ # Install with: pip install -r requirements.txt
6
+ #
7
+ # For CUDA support, install PyTorch with CUDA from: https://pytorch.org/get-started/locally/
8
+ # Example: pip install torch torchvision --index-url https://download.pytorch.org/whl/cu121
9
+ # ============================================================================
10
+
11
+ # Python Version Requirement
12
+ # Note: This project requires Python 3.8 or higher
13
+ # Tested with Python 3.12.7
14
+
15
+ # Core Deep Learning Framework
16
+ torch>=2.0.0
17
+ torchvision>=0.15.0
18
+
19
+ # HuggingFace Transformers (for BERT standalone inference)
20
+ # - transformers: For BERT models, tokenizers, and utilities
21
+ # - datasets: For loading GLUE datasets (SST-2, MNLI, etc.)
22
+ # - huggingface_hub: For downloading models from HuggingFace Hub
23
+ transformers>=4.30.0
24
+ datasets>=2.12.0
25
+ huggingface_hub>=0.16.0
26
+
27
+ # Numerical Computing
28
+ numpy>=1.24.0
29
+
30
+ # Plotting and Visualization
31
+ matplotlib>=3.7.0
32
+
33
+ # ============================================================================
34
+ # Installation Instructions:
35
+ # ============================================================================
36
+ # 1. Ensure Python 3.8+ is installed:
37
+ # python --version
38
+ #
39
+ # 2. Install all requirements:
40
+ # pip install -r requirements.txt
41
+ #
42
+ # 3. For GPU support (CUDA), install PyTorch with CUDA:
43
+ # Visit https://pytorch.org/get-started/locally/ and select your CUDA version
44
+ # Example for CUDA 12.1:
45
+ # pip install torch torchvision --index-url https://download.pytorch.org/whl/cu121
46
+ #
47
+ # 4. Verify installation:
48
+ # python -c "import torch; print(f'PyTorch: {torch.__version__}'); print(f'CUDA available: {torch.cuda.is_available()}')"
49
+ # ============================================================================
50
+ # Notes:
51
+ # - Standard library modules (os, argparse, datetime, gc, time, collections,
52
+ # copy, pathlib, json, pickle, typing, subprocess) are included with Python
53
+ # - First run will download BERT models and datasets from HuggingFace Hub
54
+ # - CIFAR-10 dataset will auto-download on first use
55
+ # ============================================================================
56
+ # Script-Specific Requirements:
57
+ # ============================================================================
58
+ # hf_inference_resnet_standalone.py requires:
59
+ # - torch, torchvision, numpy, matplotlib
60
+ #
61
+ # hf_inference_bert_standalone.py requires:
62
+ # - torch, transformers, numpy, matplotlib, datasets, huggingface_hub
63
+ # ============================================================================