Instructions to use dbands/ChemWiz_16bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dbands/ChemWiz_16bit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="dbands/ChemWiz_16bit") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("dbands/ChemWiz_16bit") model = AutoModelForCausalLM.from_pretrained("dbands/ChemWiz_16bit") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use dbands/ChemWiz_16bit with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "dbands/ChemWiz_16bit" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dbands/ChemWiz_16bit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/dbands/ChemWiz_16bit
- SGLang
How to use dbands/ChemWiz_16bit 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 "dbands/ChemWiz_16bit" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dbands/ChemWiz_16bit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "dbands/ChemWiz_16bit" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dbands/ChemWiz_16bit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use dbands/ChemWiz_16bit with Docker Model Runner:
docker model run hf.co/dbands/ChemWiz_16bit
2024-08-05: Use the following prompting to get the best out of this model:
alpaca_prompt = """Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
Instruction:
{}
Input:
{}
Response:
{}"""
The model will return the Response.
2024-08-01: This model is still making up chemical SMILE combinations, I will resolve this through fine tuning. I have also started training the model on mathimatical reasoning. This model makes stuff up, lots of stuff. I do like the fact that the model creates working code though.
2024-08-01: I have now started chaning this model to be able to create chemistry based code suitable to be used in RDKit. I used a small data set so as to perform a proof of concept.
This model is highly experimental, do not use it in production scenarios yet.
2024-07-27 This is a test model to create a plan to create code that can run in RDKit to simulate chemical reactions. I have limited the outputs to only creating the plan to implement the code, not the coding itself. This model is only intended for researchers, none of the outputs must be used in the real world, as these models can halucinante and create outcomes with unpredictable outcomes.
base_model: dbands/tantrum_16bit language: - en license: apache-2.0 tags: - text-generation-inference - transformers - unsloth - qwen2 - trl
Uploaded model
- Developed by: dbands
- License: apache-2.0
- Finetuned from model : dbands/tantrum_16bit
This qwen2 model was trained 2x faster with Unsloth and Huggingface's TRL library.
- Downloads last month
- 9
