Jayant-Kernel commited on
Commit
088adaf
·
unverified ·
1 Parent(s): 42f691c

update: charts for 1.5B model, CPU dockerfile

Browse files
Files changed (2) hide show
  1. Dockerfile +4 -16
  2. generate_charts.py +2 -2
Dockerfile CHANGED
@@ -4,24 +4,12 @@ ENV PYTHONUNBUFFERED=1
4
  ENV HF_HOME=/tmp/huggingface
5
  ENV HOME=/tmp
6
 
7
- RUN apt-get update && apt-get install -y git build-essential && rm -rf /var/lib/apt/lists/*
8
-
9
- RUN useradd -m -u 1000 trainer && \
10
- mkdir -p /home/trainer/.local/lib/python3.10/site-packages/deceit_env/data/ && \
11
- chown -R trainer:trainer /home/trainer
12
-
13
- USER trainer
14
- ENV HOME=/home/trainer
15
- ENV HF_HOME=/home/trainer/.cache/huggingface
16
- ENV TORCHINDUCTOR_CACHE_DIR=/home/trainer/.cache/torch
17
 
18
  WORKDIR /app
19
 
20
- RUN pip install --no-cache-dir torch transformers peft trl bitsandbytes accelerate wandb datasets huggingface_hub
21
-
22
- RUN pip install --no-cache-dir git+https://github.com/Jayant-kernel/DECEIT-the-ai-truth-environment-.git
23
 
24
- COPY data/ /home/trainer/.local/lib/python3.10/site-packages/deceit_env/data/
25
- COPY train.py .
26
 
27
- CMD ["python", "train.py"]
 
4
  ENV HF_HOME=/tmp/huggingface
5
  ENV HOME=/tmp
6
 
7
+ RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
 
 
 
 
 
 
 
 
 
8
 
9
  WORKDIR /app
10
 
11
+ RUN pip install --no-cache-dir matplotlib Pillow huggingface_hub
 
 
12
 
13
+ COPY generate_charts.py .
 
14
 
15
+ CMD ["python", "generate_charts.py"]
generate_charts.py CHANGED
@@ -26,7 +26,7 @@ print("Health server started")
26
  login(token=os.environ["HF_TOKEN"])
27
 
28
  # Data
29
- models = ['Base Model\n(untrained)', 'DECEIT Trained']
30
  colors = ['#e74c3c', '#2ecc71']
31
  mean_rewards = [0.137, 0.130]
32
  accuracy = [50.0, 36.7]
@@ -56,7 +56,7 @@ axes[3].set_title('Abstain Rate %\n(Honest Uncertainty - higher is better)')
56
  axes[3].set_ylabel('%')
57
  axes[3].set_ylim(0, 100)
58
 
59
- plt.suptitle('DECEIT: Base Model vs Trained Model\n(Qwen 2.5 0.5B, 30 episodes each)', fontsize=13)
60
  plt.tight_layout()
61
  plt.savefig('comparison_chart.png', dpi=150, bbox_inches='tight')
62
  plt.close()
 
26
  login(token=os.environ["HF_TOKEN"])
27
 
28
  # Data
29
+ models = ['Base Model\n(untrained)', 'DECEIT 1.5B Trained']
30
  colors = ['#e74c3c', '#2ecc71']
31
  mean_rewards = [0.137, 0.130]
32
  accuracy = [50.0, 36.7]
 
56
  axes[3].set_ylabel('%')
57
  axes[3].set_ylim(0, 100)
58
 
59
+ plt.suptitle('DECEIT: Base Model vs Trained Model\n(Qwen 2.5 1.5B, 30 episodes each)', fontsize=13)
60
  plt.tight_layout()
61
  plt.savefig('comparison_chart.png', dpi=150, bbox_inches='tight')
62
  plt.close()