Instructions to use Wanfq/Explore-LM-Ext-7B-Math with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Wanfq/Explore-LM-Ext-7B-Math with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Wanfq/Explore-LM-Ext-7B-Math")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Wanfq/Explore-LM-Ext-7B-Math") model = AutoModelForCausalLM.from_pretrained("Wanfq/Explore-LM-Ext-7B-Math") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Wanfq/Explore-LM-Ext-7B-Math with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Wanfq/Explore-LM-Ext-7B-Math" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Wanfq/Explore-LM-Ext-7B-Math", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Wanfq/Explore-LM-Ext-7B-Math
- SGLang
How to use Wanfq/Explore-LM-Ext-7B-Math with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Wanfq/Explore-LM-Ext-7B-Math" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Wanfq/Explore-LM-Ext-7B-Math", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Wanfq/Explore-LM-Ext-7B-Math" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Wanfq/Explore-LM-Ext-7B-Math", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Wanfq/Explore-LM-Ext-7B-Math with Docker Model Runner:
docker model run hf.co/Wanfq/Explore-LM-Ext-7B-Math
Update README.md
Browse files
README.md
CHANGED
|
@@ -198,7 +198,7 @@ We fine-tune LLaMA-7B with the following hyperparameters:
|
|
| 198 |
|
| 199 |
| Hyperparameter | Global Batch Size | Learning rate | Epochs | Max length | Weight decay |
|
| 200 |
|:----------------|-------------------:|---------------:|--------:|------------:|--------------:|
|
| 201 |
-
| LLaMA 7B | 128 | 2e-5 | 3 |
|
| 202 |
|
| 203 |
To reproduce the training procedure, please use the following command:
|
| 204 |
|
|
@@ -259,7 +259,7 @@ python3 ./eval/generate.py \
|
|
| 259 |
--prompt_type alpaca \
|
| 260 |
--do_sample
|
| 261 |
|
| 262 |
-
2. Evaluation
|
| 263 |
python3 ./eval/chatgpt_score.py \
|
| 264 |
--baseline_file ./eval/answer/<MODEL_1>.jsonl \ # answer of baseline model to compare with
|
| 265 |
--answer_file ./eval/answer/<MODEL_2>.jsonl \ # answer of evaluation model
|
|
@@ -285,10 +285,10 @@ python3 ./eval/generate.py \
|
|
| 285 |
--max_new_tokens 512 \
|
| 286 |
--prompt_type alpaca
|
| 287 |
|
| 288 |
-
2. Evaluation
|
| 289 |
python3 ./eval/auto_eval.py \
|
| 290 |
--question_file ./eval/question/MATH_eval_set_sample.jsonl \
|
| 291 |
-
--answer_file ./eval/answer/<MODEL_ID>.jsonl
|
| 292 |
```
|
| 293 |
|
| 294 |
## Limitations
|
|
|
|
| 198 |
|
| 199 |
| Hyperparameter | Global Batch Size | Learning rate | Epochs | Max length | Weight decay |
|
| 200 |
|:----------------|-------------------:|---------------:|--------:|------------:|--------------:|
|
| 201 |
+
| LLaMA 7B | 128 | 2e-5 | 3 | 512| 0 |
|
| 202 |
|
| 203 |
To reproduce the training procedure, please use the following command:
|
| 204 |
|
|
|
|
| 259 |
--prompt_type alpaca \
|
| 260 |
--do_sample
|
| 261 |
|
| 262 |
+
# 2. Evaluation
|
| 263 |
python3 ./eval/chatgpt_score.py \
|
| 264 |
--baseline_file ./eval/answer/<MODEL_1>.jsonl \ # answer of baseline model to compare with
|
| 265 |
--answer_file ./eval/answer/<MODEL_2>.jsonl \ # answer of evaluation model
|
|
|
|
| 285 |
--max_new_tokens 512 \
|
| 286 |
--prompt_type alpaca
|
| 287 |
|
| 288 |
+
# 2. Evaluation
|
| 289 |
python3 ./eval/auto_eval.py \
|
| 290 |
--question_file ./eval/question/MATH_eval_set_sample.jsonl \
|
| 291 |
+
--answer_file ./eval/answer/<MODEL_ID>.jsonl # answer of evaluation model
|
| 292 |
```
|
| 293 |
|
| 294 |
## Limitations
|