Text Generation
Transformers
Safetensors
English
plasmid_lm
biology
genomics
plasmid
dna
causal-lm
synthetic-biology
custom_code
Instructions to use McClain/PlasmidLM with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use McClain/PlasmidLM with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="McClain/PlasmidLM", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("McClain/PlasmidLM", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use McClain/PlasmidLM with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "McClain/PlasmidLM" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "McClain/PlasmidLM", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/McClain/PlasmidLM
- SGLang
How to use McClain/PlasmidLM 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 "McClain/PlasmidLM" \ --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": "McClain/PlasmidLM", "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 "McClain/PlasmidLM" \ --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": "McClain/PlasmidLM", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use McClain/PlasmidLM with Docker Model Runner:
docker model run hf.co/McClain/PlasmidLM
Download config.json from McClain/PlasmidLM: direct link, hf CLI and curl.
- Browser
- Download file 818 Bytes
-
https://huggingface.co/McClain/PlasmidLM/resolve/main/config.json
- Command line
-
hf download hf://McClain/PlasmidLM/config.json
-
curl -L -o config.json https://huggingface.co/McClain/PlasmidLM/resolve/main/config.json
818 Bytes
| { | |
| "architectures": [ | |
| "PlasmidLMForCausalLM" | |
| ], | |
| "bos_token_id": 0, | |
| "dtype": "float32", | |
| "eos_token_id": 1, | |
| "hidden_act": "gelu", | |
| "hidden_size": 384, | |
| "intermediate_size": 1536, | |
| "max_position_embeddings": 16384, | |
| "model_type": "plasmid_lm", | |
| "num_attention_heads": 8, | |
| "num_hidden_layers": 10, | |
| "pad_token_id": 3, | |
| "rms_norm_eps": 1e-05, | |
| "rope_theta": 10000.0, | |
| "transformers_version": "4.57.6", | |
| "vocab_size": 120, | |
| "auto_map": { | |
| "AutoConfig": "configuration_plasmid_lm.PlasmidLMConfig", | |
| "AutoModel": "modeling_plasmid_lm.PlasmidLMModel", | |
| "AutoModelForCausalLM": "modeling_plasmid_lm.PlasmidLMForCausalLM", | |
| "AutoTokenizer": [ | |
| "tokenization_plasmid_lm.PlasmidLMTokenizer", | |
| null | |
| ] | |
| }, | |
| "use_moe": false, | |
| "tie_word_embeddings": true, | |
| "use_cache": false | |
| } |