Skip to content

Commit ed8cf01

Browse files
committed
Initial commit conda-envs
1 parent db859ed commit ed8cf01

File tree

10 files changed

+962
-0
lines changed

10 files changed

+962
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Copyright (c) 2024 Oracle and/or its affiliates.
2+
3+
The Universal Permissive License (UPL), Version 1.0
4+
5+
Subject to the condition set forth below, permission is hereby granted to any
6+
person obtaining a copy of this software, associated documentation and/or data
7+
(collectively the "Software"), free of charge and under any and all copyright
8+
rights in the Software, and any and all patent rights owned or freely
9+
licensable by each licensor hereunder covering either (i) the unmodified
10+
Software as contributed to or provided by such licensor, or (ii) the Larger
11+
Works (as defined below), to deal in both
12+
13+
(a) the Software, and
14+
(b) any piece of software and/or hardware listed in the lrgrwrks.txt file if
15+
one is included with the Software (each a "Larger Work" to which the Software
16+
is contributed by such licensors),
17+
18+
without restriction, including without limitation the rights to copy, create
19+
derivative works of, display, perform, and distribute the Software and make,
20+
use, sell, offer for sale, import, export, have made, and have sold the
21+
Software and the Larger Work(s), and to sublicense the foregoing rights on
22+
either these or other terms.
23+
24+
This license is subject to the following condition:
25+
The above copyright notice and either this complete permission notice or at
26+
a minimum a reference to the UPL must be included in all copies or
27+
substantial portions of the Software.
28+
29+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
30+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
32+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
33+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
34+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
35+
SOFTWARE.
Lines changed: 186 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,186 @@
1+
name: pytorch
2+
channels:
3+
- defaults
4+
dependencies:
5+
- _libgcc_mutex=0.1=main
6+
- _openmp_mutex=5.1=1_gnu
7+
- blas=1.0=mkl
8+
- ca-certificates=2024.3.11=h06a4308_0
9+
- cffi=1.16.0=py39h5eee18b_0
10+
- filelock=3.13.1=py39h06a4308_0
11+
- fsspec=2023.10.0=py39h06a4308_0
12+
- gmp=6.2.1=h295c915_3
13+
- gmpy2=2.1.2=py39heeb90bb_0
14+
- intel-openmp=2023.1.0=hdb19cb5_46306
15+
- jinja2=3.1.3=py39h06a4308_0
16+
- ld_impl_linux-64=2.38=h1181459_1
17+
- libffi=3.4.4=h6a678d5_0
18+
- libgcc-ng=11.2.0=h1234567_1
19+
- libgomp=11.2.0=h1234567_1
20+
- libprotobuf=3.20.3=he621ea3_0
21+
- libstdcxx-ng=11.2.0=h1234567_1
22+
- markupsafe=2.1.3=py39h5eee18b_0
23+
- mkl=2023.1.0=h213fc3f_46344
24+
- mkl-service=2.4.0=py39h5eee18b_1
25+
- mkl_fft=1.3.8=py39h5eee18b_0
26+
- mkl_random=1.2.4=py39hdb19cb5_0
27+
- mpc=1.1.0=h10f8cd9_1
28+
- mpfr=4.0.2=hb69a4c5_1
29+
- mpmath=1.3.0=py39h06a4308_0
30+
- ncurses=6.4=h6a678d5_0
31+
- networkx=3.1=py39h06a4308_0
32+
- ninja=1.10.2=h06a4308_5
33+
- ninja-base=1.10.2=hd09550d_5
34+
- numpy=1.26.4=py39h5f9d8c6_0
35+
- numpy-base=1.26.4=py39hb5e798b_0
36+
- openssl=3.0.13=h7f8727e_0
37+
- pip=23.3.1=py39h06a4308_0
38+
- pycparser=2.21=pyhd3eb1b0_0
39+
- python=3.9.19=h955ad1f_0
40+
- readline=8.2=h5eee18b_0
41+
- setuptools=68.2.2=py39h06a4308_0
42+
- sqlite=3.41.2=h5eee18b_0
43+
- sympy=1.12=py39h06a4308_0
44+
- tbb=2021.8.0=hdb19cb5_0
45+
- tk=8.6.12=h1ccaba5_0
46+
- typing_extensions=4.9.0=py39h06a4308_1
47+
- wheel=0.41.2=py39h06a4308_0
48+
- xz=5.4.6=h5eee18b_0
49+
- zlib=1.2.13=h5eee18b_0
50+
- pip:
51+
- accelerate==0.28.0
52+
- aiohttp==3.9.3
53+
- aiosignal==1.3.1
54+
- anyio==4.3.0
55+
- argon2-cffi==23.1.0
56+
- argon2-cffi-bindings==21.2.0
57+
- arrow==1.3.0
58+
- asttokens==2.4.1
59+
- async-lru==2.0.4
60+
- async-timeout==4.0.3
61+
- attrs==23.2.0
62+
- babel==2.14.0
63+
- beautifulsoup4==4.12.3
64+
- bleach==6.1.0
65+
- certifi==2024.2.2
66+
- charset-normalizer==3.3.2
67+
- comm==0.2.2
68+
- datasets==2.18.0
69+
- debugpy==1.8.1
70+
- decorator==5.1.1
71+
- defusedxml==0.7.1
72+
- dill==0.3.8
73+
- docstring-parser==0.16
74+
- exceptiongroup==1.2.0
75+
- executing==2.0.1
76+
- fastjsonschema==2.19.1
77+
- fqdn==1.5.1
78+
- frozenlist==1.4.1
79+
- h11==0.14.0
80+
- httpcore==1.0.4
81+
- httpx==0.27.0
82+
- huggingface-hub==0.22.0
83+
- idna==3.6
84+
- importlib-metadata==7.1.0
85+
- ipykernel==6.29.3
86+
- ipython==8.18.1
87+
- isoduration==20.11.0
88+
- jedi==0.19.1
89+
- json5==0.9.24
90+
- jsonpointer==2.4
91+
- jsonschema==4.21.1
92+
- jsonschema-specifications==2023.12.1
93+
- jupyter-client==8.6.1
94+
- jupyter-core==5.7.2
95+
- jupyter-events==0.10.0
96+
- jupyter-lsp==2.2.4
97+
- jupyter-server==2.13.0
98+
- jupyter-server-terminals==0.5.3
99+
- jupyterlab==4.1.5
100+
- jupyterlab-pygments==0.3.0
101+
- jupyterlab-server==2.25.4
102+
- markdown-it-py==3.0.0
103+
- matplotlib-inline==0.1.6
104+
- mdurl==0.1.2
105+
- mistune==3.0.2
106+
- multidict==6.0.5
107+
- multiprocess==0.70.16
108+
- nbclient==0.10.0
109+
- nbconvert==7.16.3
110+
- nbformat==5.10.3
111+
- nest-asyncio==1.6.0
112+
- notebook-shim==0.2.4
113+
- nvidia-cublas-cu12==12.1.3.1
114+
- nvidia-cuda-cupti-cu12==12.1.105
115+
- nvidia-cuda-nvrtc-cu12==12.1.105
116+
- nvidia-cuda-runtime-cu12==12.1.105
117+
- nvidia-cudnn-cu12==8.9.2.26
118+
- nvidia-cufft-cu12==11.0.2.54
119+
- nvidia-curand-cu12==10.3.2.106
120+
- nvidia-cusolver-cu12==11.4.5.107
121+
- nvidia-cusparse-cu12==12.1.0.106
122+
- nvidia-nccl-cu12==2.19.3
123+
- nvidia-nvjitlink-cu12==12.4.99
124+
- nvidia-nvtx-cu12==12.1.105
125+
- overrides==7.7.0
126+
- packaging==24.0
127+
- pandas==2.2.1
128+
- pandocfilters==1.5.1
129+
- parso==0.8.3
130+
- peft==0.10.0
131+
- pexpect==4.9.0
132+
- pillow==10.2.0
133+
- platformdirs==4.2.0
134+
- prometheus-client==0.20.0
135+
- prompt-toolkit==3.0.43
136+
- psutil==5.9.8
137+
- ptyprocess==0.7.0
138+
- pure-eval==0.2.2
139+
- pyarrow==15.0.2
140+
- pyarrow-hotfix==0.6
141+
- pygments==2.17.2
142+
- python-dateutil==2.9.0.post0
143+
- python-json-logger==2.0.7
144+
- pytz==2024.1
145+
- pyyaml==6.0.1
146+
- pyzmq==25.1.2
147+
- referencing==0.34.0
148+
- regex==2023.12.25
149+
- requests==2.31.0
150+
- rfc3339-validator==0.1.4
151+
- rfc3986-validator==0.1.1
152+
- rich==13.7.1
153+
- rpds-py==0.18.0
154+
- safetensors==0.4.2
155+
- send2trash==1.8.2
156+
- shtab==1.7.1
157+
- six==1.16.0
158+
- sniffio==1.3.1
159+
- soupsieve==2.5
160+
- stack-data==0.6.3
161+
- terminado==0.18.1
162+
- test-pytorch-gpu==0.0.4
163+
- tinycss2==1.2.1
164+
- tokenizers==0.15.2
165+
- tomli==2.0.1
166+
- torch==2.2.1
167+
- torchvision==0.17.1
168+
- tornado==6.4
169+
- tqdm==4.66.2
170+
- traitlets==5.14.2
171+
- transformers==4.39.1
172+
- triton==2.2.0
173+
- trl==0.8.1
174+
- types-python-dateutil==2.9.0.20240316
175+
- tyro==0.7.3
176+
- tzdata==2024.1
177+
- uri-template==1.3.0
178+
- urllib3==2.2.1
179+
- wcwidth==0.2.13
180+
- webcolors==1.13
181+
- webencodings==0.5.1
182+
- websocket-client==1.7.0
183+
- xxhash==3.4.1
184+
- yarl==1.9.4
185+
- zipp==3.18.1
186+
prefix: /home/opc/anaconda3/envs/pytorch
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Import the Locust dependencies
2+
from locust import HttpUser, task
3+
4+
# Import general library from python
5+
import os
6+
import random
7+
8+
# Import lorem ipsum library to generate some random texts
9+
from lorem_text import lorem
10+
11+
# Import dotenv to load the environments variables
12+
from dotenv import load_dotenv
13+
load_dotenv()
14+
15+
# Create a table with some lorem ipsum texts
16+
messages = []
17+
18+
# Add 1000 random texts of 10 paragraphs each (simulate 1000 emails)
19+
for i in range(1000):
20+
messages.append(lorem.paragraphs(10))
21+
22+
# Define the headers of the request. Token is stored as an environment variable here
23+
headers = {
24+
"Authorization": "Bearer {os.getenv('TOKEN')}", "Content-Type": "application/json"}
25+
26+
class HelloWorldUser(HttpUser):
27+
# Definition of the first path where we do our post request
28+
@task
29+
def hello_world(self):
30+
# Define the body with the email choose randomly from the tab of all the emails
31+
body = {"model": "meta-llama/Llama-2-7b-chat-hf","prompt": "the following is a conversation with an AI research assistant. The assistant tone is technical and scientific. Human: Hello, who are you? AI: Greeting! I am an AI research assistant. How can I help you today? Human: Can you tell me about the creation of blackholes? AI:","max_tokens": 20,"temperature": 0}
32+
# Do the post request on the spam detection path
33+
self.client.post("/v1/completions",
34+
headers=headers, json=body)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
from vllm import LLM
2+
3+
# Replace the model name with the one you want to use:
4+
# Mixtral simple: mistralai/Mixtral-8x7B-v0.1
5+
# Mixtral instruct: mistralai/Mixtral-8x7B-Instruct-v0.1
6+
# Mistral 7B simple: mistralai/Mistral-7B-v0.1
7+
# Mistral 7B instruct: mistralai/Mistral-7B-Instruct-v0.1
8+
# LLaMA 2 70B: meta-llama/Llama-2-70b-hf
9+
10+
11+
12+
llm = LLM("meta-llama/Llama-2-7b-chat-hf", tensor_parallel_size=1, max_model_len=4096)
13+
14+
print(llm.generate("What is batch inference?"))
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from langchain_community.llms import VLLM
2+
3+
llm = VLLM(model="mosaicml/mpt-7b",
4+
trust_remote_code=True, # mandatory for hf models
5+
max_new_tokens=128,
6+
top_k=10,
7+
top_p=0.95,
8+
temperature=0.8,
9+
# tensor_parallel_size=... # for distributed inference
10+
)
11+
12+
print(llm("What is the capital of France ?"))

0 commit comments

Comments
 (0)