Download tests/train/test_sample.py from eve1f/ckpt: direct link, hf CLI and curl.
- Browser
- Download file 363 Bytes
-
https://huggingface.co/datasets/eve1f/ckpt/resolve/main/tests/train/test_sample.py
- Command line
-
hf download hf://datasets/eve1f/ckpt/tests/train/test_sample.py
-
curl -L -o test_sample.py https://huggingface.co/datasets/eve1f/ckpt/resolve/main/tests/train/test_sample.py
363 Bytes
| from swift.llm import SamplingArguments, sampling_main | |
| def test_sampling(): | |
| sampling_main( | |
| SamplingArguments( | |
| model='LLM-Research/Meta-Llama-3.1-8B-Instruct', | |
| sampler_engine='pt', | |
| num_return_sequences=5, | |
| dataset='AI-ModelScope/alpaca-gpt4-data-zh#5')) | |
| if __name__ == '__main__': | |
| test_sampling() | |