Instructions to use StarLiu714/GPT-oss-MOFinder-Yearwise with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use StarLiu714/GPT-oss-MOFinder-Yearwise with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="StarLiu714/GPT-oss-MOFinder-Yearwise") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("StarLiu714/GPT-oss-MOFinder-Yearwise") model = AutoModelForCausalLM.from_pretrained("StarLiu714/GPT-oss-MOFinder-Yearwise", device_map="auto") 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use StarLiu714/GPT-oss-MOFinder-Yearwise with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "StarLiu714/GPT-oss-MOFinder-Yearwise" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "StarLiu714/GPT-oss-MOFinder-Yearwise", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/StarLiu714/GPT-oss-MOFinder-Yearwise
- SGLang
How to use StarLiu714/GPT-oss-MOFinder-Yearwise 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 "StarLiu714/GPT-oss-MOFinder-Yearwise" \ --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": "StarLiu714/GPT-oss-MOFinder-Yearwise", "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 "StarLiu714/GPT-oss-MOFinder-Yearwise" \ --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": "StarLiu714/GPT-oss-MOFinder-Yearwise", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use StarLiu714/GPT-oss-MOFinder-Yearwise with Docker Model Runner:
docker model run hf.co/StarLiu714/GPT-oss-MOFinder-Yearwise
GPT-oss-MOF-Yearwise: pre 2017 training
This repository shows a series of AutoModelForCausalLM which are respectively trained on literature data with different publication year range.
We reports their forecasting performance on next-period published experimental data.
This 1999-2017 branch specifically trained GPT on MOF literatures prior than 2017.
Result
| Train set spans | Inference | Test size | Accuracy |
|---|---|---|---|
| ~2017 | Holdout | 1320P+ 1275N | 0.73295 |
| ~2017 | 22 questions | 11P + 11N | 17/22 |
| ~2017 | 2018-2020 | 2232P + 1922N | 0.66635 |
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "GPT-oss-MOF-Yearwise"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto")
To go throught the quick start details for reprduction, see the official released MOFinder main checkpoint which is well-trained on full PN data.
Citation and license
When using these weights, cite MOFinder, identify StarLiu714/GPT-oss-MOF and the Hub revision used, and reference the GPT-oss-20B base model.
This release is licensed under the GNU General Public License v3.0; see LICENSE.
The underlying GPT-oss-20B model retains its upstream Apache-2.0 license, reproduced in LICENSE.base-model. This release includes MOF fine-tuning changes merged into the base model and a BF16 weight export.
MOFinder codebase is separately licensed under MIT.
- Downloads last month
- 395
Model tree for StarLiu714/GPT-oss-MOFinder-Yearwise
Base model
openai/gpt-oss-20b