Instructions to use AI4Chem/ChemLLM-7B-Chat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AI4Chem/ChemLLM-7B-Chat with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AI4Chem/ChemLLM-7B-Chat", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("AI4Chem/ChemLLM-7B-Chat", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use AI4Chem/ChemLLM-7B-Chat with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AI4Chem/ChemLLM-7B-Chat" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AI4Chem/ChemLLM-7B-Chat", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/AI4Chem/ChemLLM-7B-Chat
- SGLang
How to use AI4Chem/ChemLLM-7B-Chat 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 "AI4Chem/ChemLLM-7B-Chat" \ --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": "AI4Chem/ChemLLM-7B-Chat", "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 "AI4Chem/ChemLLM-7B-Chat" \ --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": "AI4Chem/ChemLLM-7B-Chat", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use AI4Chem/ChemLLM-7B-Chat with Docker Model Runner:
docker model run hf.co/AI4Chem/ChemLLM-7B-Chat
About the training data and details
What is the composition and quantity of the training data, and will there be technical reports?
technical reports will be available in this week.
I will reply you after that.
I have paste some Evaluation result from technique report for preview only.
You can check our news report (in Chinese).
代码有没有在github上开源,我想了解更多技术细节
ChemLLM datasets is all open source now!
https://huggingface.co/papers/2402.06852
700K of SFT Dataset, ChemData700K For Chemistry of LLM!
https://huggingface.co/datasets/AI4Chem/ChemData700K
10K of DPO Dataset, ChemPref-10K, both English and Chinese!
https://huggingface.co/datasets/AI4Chem/ChemPref-DPO-for-Chemistry-data-en
https://huggingface.co/datasets/AI4Chem/ChemPref-DPO-for-Chemistry-data-cn
ChemBench-4K of 4100 high-quality single-choice benchmark for nine core Chemistry tasks!
https://huggingface.co/datasets/AI4Chem/ChemBench4K
C-MHChem, 600 real test questions written and checked manually, from 25 years of Chinese National Middle school chemistry Test!
https://huggingface.co/datasets/AI4Chem/C-MHChem-Benchmark-Chinese-Middle-high-school-Chemistry-Test
All hail to Open-source community!🤗
代码有没有在github上开源,我想了解更多技术细节
ChemLLM datasets is all open source now!
https://huggingface.co/papers/2402.06852
700K of SFT Dataset, ChemData700K For Chemistry of LLM!
https://huggingface.co/datasets/AI4Chem/ChemData700K
10K of DPO Dataset, ChemPref-10K, both English and Chinese!
https://huggingface.co/datasets/AI4Chem/ChemPref-DPO-for-Chemistry-data-en
https://huggingface.co/datasets/AI4Chem/ChemPref-DPO-for-Chemistry-data-cn
ChemBench-4K of 4100 high-quality single-choice benchmark for nine core Chemistry tasks!
https://huggingface.co/datasets/AI4Chem/ChemBench4K
C-MHChem, 600 real test questions written and checked manually, from 25 years of Chinese National Middle school chemistry Test!
https://huggingface.co/datasets/AI4Chem/C-MHChem-Benchmark-Chinese-Middle-high-school-Chemistry-Test
All hail to Open-source community!🤗
代码有没有在github上开源,我想了解更多技术细节
ChemLLM datasets is all open source now!
https://huggingface.co/papers/2402.06852
700K of SFT Dataset, ChemData700K For Chemistry of LLM!
https://huggingface.co/datasets/AI4Chem/ChemData700K
10K of DPO Dataset, ChemPref-10K, both English and Chinese!
https://huggingface.co/datasets/AI4Chem/ChemPref-DPO-for-Chemistry-data-en
https://huggingface.co/datasets/AI4Chem/ChemPref-DPO-for-Chemistry-data-cn
ChemBench-4K of 4100 high-quality single-choice benchmark for nine core Chemistry tasks!
https://huggingface.co/datasets/AI4Chem/ChemBench4K
C-MHChem, 600 real test questions written and checked manually, from 25 years of Chinese National Middle school chemistry Test!
https://huggingface.co/datasets/AI4Chem/C-MHChem-Benchmark-Chinese-Middle-high-school-Chemistry-Test
All hail to Open-source community!🤗
请问能否提供用于验证模型性能的代码