Commit
·
e1cb58c
1
Parent(s):
2841b26
update examples to not assert check on tokens
Browse files
examples/argilla_deployment.py
CHANGED
@@ -4,6 +4,7 @@ import os
|
|
4 |
from synthetic_dataset_generator import launch
|
5 |
|
6 |
# Follow https://docs.argilla.io/latest/getting_started/quickstart/ to get your Argilla API key and URL
|
|
|
7 |
os.environ["ARGILLA_API_URL"] = (
|
8 |
"https://[your-owner-name]-[your_space_name].hf.space" # argilla base url
|
9 |
)
|
|
|
4 |
from synthetic_dataset_generator import launch
|
5 |
|
6 |
# Follow https://docs.argilla.io/latest/getting_started/quickstart/ to get your Argilla API key and URL
|
7 |
+
os.environ["HF_TOKEN"] = "hf_..."
|
8 |
os.environ["ARGILLA_API_URL"] = (
|
9 |
"https://[your-owner-name]-[your_space_name].hf.space" # argilla base url
|
10 |
)
|
examples/hf-serverless_deployment.py
CHANGED
@@ -3,7 +3,7 @@ import os
|
|
3 |
|
4 |
from synthetic_dataset_generator import launch
|
5 |
|
6 |
-
|
7 |
os.environ["MODEL"] = "meta-llama/Llama-3.1-8B-Instruct" # use instruct model
|
8 |
os.environ["MAGPIE_PRE_QUERY_TEMPLATE"] = "llama3" # use the template for the model
|
9 |
|
|
|
3 |
|
4 |
from synthetic_dataset_generator import launch
|
5 |
|
6 |
+
os.environ["HF_TOKEN"] = "hf_..." # push the data to huggingface
|
7 |
os.environ["MODEL"] = "meta-llama/Llama-3.1-8B-Instruct" # use instruct model
|
8 |
os.environ["MAGPIE_PRE_QUERY_TEMPLATE"] = "llama3" # use the template for the model
|
9 |
|
examples/ollama_deployment.py
CHANGED
@@ -5,13 +5,13 @@ import os
|
|
5 |
|
6 |
from synthetic_dataset_generator import launch
|
7 |
|
8 |
-
|
9 |
os.environ["OLLAMA_BASE_URL"] = "http://127.0.0.1:11434/" # ollama base url
|
10 |
-
os.environ["MODEL"] = "
|
11 |
-
os.environ["TOKENIZER_ID"] = "
|
12 |
-
os.environ["MAGPIE_PRE_QUERY_TEMPLATE"] = "
|
13 |
os.environ["MAX_NUM_ROWS"] = "10000"
|
14 |
-
os.environ["DEFAULT_BATCH_SIZE"] = "
|
15 |
os.environ["MAX_NUM_TOKENS"] = "1024"
|
16 |
|
17 |
launch()
|
|
|
5 |
|
6 |
from synthetic_dataset_generator import launch
|
7 |
|
8 |
+
# os.environ["HF_TOKEN"] = "hf_..." # push the data to huggingface
|
9 |
os.environ["OLLAMA_BASE_URL"] = "http://127.0.0.1:11434/" # ollama base url
|
10 |
+
os.environ["MODEL"] = "qwen2.5:32b-instruct-q5_K_S" # model id
|
11 |
+
os.environ["TOKENIZER_ID"] = "Qwen/Qwen2.5-32B-Instruct" # tokenizer id
|
12 |
+
os.environ["MAGPIE_PRE_QUERY_TEMPLATE"] = "qwen2"
|
13 |
os.environ["MAX_NUM_ROWS"] = "10000"
|
14 |
+
os.environ["DEFAULT_BATCH_SIZE"] = "2"
|
15 |
os.environ["MAX_NUM_TOKENS"] = "1024"
|
16 |
|
17 |
launch()
|
examples/openai_deployment.py
CHANGED
@@ -3,7 +3,7 @@ import os
|
|
3 |
|
4 |
from synthetic_dataset_generator import launch
|
5 |
|
6 |
-
|
7 |
os.environ["OPENAI_BASE_URL"] = "https://api.openai.com/v1/" # openai base url
|
8 |
os.environ["API_KEY"] = os.getenv("OPENAI_API_KEY") # openai api key
|
9 |
os.environ["MODEL"] = "gpt-4o" # model id
|
|
|
3 |
|
4 |
from synthetic_dataset_generator import launch
|
5 |
|
6 |
+
os.environ["HF_TOKEN"] = "hf_..." # push the data to huggingface
|
7 |
os.environ["OPENAI_BASE_URL"] = "https://api.openai.com/v1/" # openai base url
|
8 |
os.environ["API_KEY"] = os.getenv("OPENAI_API_KEY") # openai api key
|
9 |
os.environ["MODEL"] = "gpt-4o" # model id
|
examples/tgi_or_hf_dedicated.py
CHANGED
@@ -3,7 +3,7 @@ import os
|
|
3 |
|
4 |
from synthetic_dataset_generator import launch
|
5 |
|
6 |
-
|
7 |
os.environ["HUGGINGFACE_BASE_URL"] = "http://127.0.0.1:3000/" # dedicated endpoint/TGI
|
8 |
os.environ["MAGPIE_PRE_QUERY_TEMPLATE"] = "llama3" # magpie template
|
9 |
os.environ["TOKENIZER_ID"] = (
|
|
|
3 |
|
4 |
from synthetic_dataset_generator import launch
|
5 |
|
6 |
+
os.environ["HF_TOKEN"] = "hf_..." # push the data to huggingface
|
7 |
os.environ["HUGGINGFACE_BASE_URL"] = "http://127.0.0.1:3000/" # dedicated endpoint/TGI
|
8 |
os.environ["MAGPIE_PRE_QUERY_TEMPLATE"] = "llama3" # magpie template
|
9 |
os.environ["TOKENIZER_ID"] = (
|