mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-07-27 15:37:44 +00:00
docs: update configuration docs (#1155)
* update configuration docs * update configuration docs * update configuration docs
This commit is contained in:
@@ -172,6 +172,9 @@ More details can be found in the [development setup](https://rdagent.readthedocs
|
||||
- **Using LiteLLM (Default)**: We now support LiteLLM as a backend for integration with multiple LLM providers. You can configure in multiple ways:
|
||||
|
||||
**Option 1: Unified API base for both models**
|
||||
|
||||
*Configuration Example: `OpenAI` Setup :*
|
||||
|
||||
```bash
|
||||
cat << EOF > .env
|
||||
# Set to any model supported by LiteLLM.
|
||||
@@ -182,6 +185,19 @@ More details can be found in the [development setup](https://rdagent.readthedocs
|
||||
OPENAI_API_KEY=<replace_with_your_openai_api_key>
|
||||
```
|
||||
|
||||
*Configuration Example: `Azure OpenAI` Setup :*
|
||||
|
||||
> Before using this configuration, please confirm in advance that your `Azure OpenAI API key` supports `embedded models`.
|
||||
|
||||
```bash
|
||||
cat << EOF > .env
|
||||
EMBEDDING_MODEL=azure/<Model deployment supporting embedding>
|
||||
CHAT_MODEL=azure/<your deployment name>
|
||||
AZURE_API_KEY=<replace_with_your_openai_api_key>
|
||||
AZURE_API_BASE=<your_unified_api_base>
|
||||
AZURE_API_VERSION=<azure api version>
|
||||
```
|
||||
|
||||
**Option 2: Separate API bases for Chat and Embedding models**
|
||||
```bash
|
||||
cat << EOF > .env
|
||||
@@ -201,7 +217,7 @@ More details can be found in the [development setup](https://rdagent.readthedocs
|
||||
LITELLM_PROXY_API_BASE=https://api.siliconflow.cn/v1
|
||||
```
|
||||
|
||||
**Configuration Example: DeepSeek Setup**:
|
||||
*Configuration Example: `DeepSeek` Setup :*
|
||||
|
||||
>Since many users encounter configuration errors when setting up DeepSeek. Here's a complete working example for DeepSeek Setup:
|
||||
```bash
|
||||
|
||||
@@ -148,6 +148,17 @@ To align with the Python SDK example above, you can configure the `CHAT_MODEL` b
|
||||
|
||||
This configuration allows you to call Azure OpenAI through LiteLLM while using an external provider (e.g., SiliconFlow) for embeddings.
|
||||
|
||||
If your `Azure OpenAI API Key`` supports `embedding model`, you can refer to the following configuration example.
|
||||
|
||||
.. code-block:: Properties
|
||||
|
||||
cat << EOF > .env
|
||||
EMBEDDING_MODEL=azure/<Model deployment supporting embedding>
|
||||
CHAT_MODEL=azure/<your deployment name>
|
||||
AZURE_API_KEY=<replace_with_your_openai_api_key>
|
||||
AZURE_API_BASE=<your_unified_api_base>
|
||||
AZURE_API_VERSION=<azure api version>
|
||||
|
||||
Configuration(deprecated)
|
||||
=========================
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ def create_debug_data(
|
||||
min_frac: float = 0.02,
|
||||
min_num: int = 10,
|
||||
):
|
||||
dataset_root = Path(dataset_path) / "arf-12-hour-prediction-task"
|
||||
dataset_root = Path(dataset_path) / "arf-12-hours-prediction-task"
|
||||
output_root = Path(output_path)
|
||||
|
||||
for sub in ["train", "test"]:
|
||||
|
||||
@@ -60,7 +60,7 @@ if __name__ == "__main__":
|
||||
print(
|
||||
json.dumps(
|
||||
{
|
||||
"competition_id": "arf-12-hour-prediction-task",
|
||||
"competition_id": "arf-12-hours-prediction-task",
|
||||
"score": score,
|
||||
}
|
||||
)
|
||||
|
||||
+2
-2
@@ -11,8 +11,8 @@ ROOT_DIR = CURRENT_DIR.parent.parent
|
||||
raw_feature_path = CURRENT_DIR / "X.npz"
|
||||
raw_label_path = CURRENT_DIR / "ARF_12h.csv"
|
||||
|
||||
public = ROOT_DIR / "arf-12-hour-prediction-task"
|
||||
private = ROOT_DIR / "eval" / "arf-12-hour-prediction-task"
|
||||
public = ROOT_DIR / "arf-12-hours-prediction-task"
|
||||
private = ROOT_DIR / "eval" / "arf-12-hours-prediction-task"
|
||||
|
||||
if not (public / "test").exists():
|
||||
(public / "test").mkdir(parents=True, exist_ok=True)
|
||||
|
||||
Reference in New Issue
Block a user