Text Generation
Transformers
TensorBoard
Safetensors
biology
genomics
rna
sequence-generation
regression
reinforcement-learning
git-lfs
Instructions to use JoyXiangLab/rnaseek-full with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use JoyXiangLab/rnaseek-full with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="JoyXiangLab/rnaseek-full")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("JoyXiangLab/rnaseek-full", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use JoyXiangLab/rnaseek-full with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "JoyXiangLab/rnaseek-full" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "JoyXiangLab/rnaseek-full", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/JoyXiangLab/rnaseek-full
- SGLang
How to use JoyXiangLab/rnaseek-full 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 "JoyXiangLab/rnaseek-full" \ --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": "JoyXiangLab/rnaseek-full", "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 "JoyXiangLab/rnaseek-full" \ --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": "JoyXiangLab/rnaseek-full", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use JoyXiangLab/rnaseek-full with Docker Model Runner:
docker model run hf.co/JoyXiangLab/rnaseek-full
| # Copyright 2025 the LlamaFactory team. | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, | |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| # See the License for the specific language governing permissions and | |
| # limitations under the License. | |
| import ipaddress | |
| import json | |
| import os | |
| import socket | |
| from typing import TYPE_CHECKING, Any | |
| from urllib.parse import urlparse | |
| from ..extras.misc import is_env_enabled | |
| from ..extras.packages import is_fastapi_available | |
| if is_fastapi_available(): | |
| from fastapi import HTTPException, status | |
| if TYPE_CHECKING: | |
| from pydantic import BaseModel | |
| SAFE_MEDIA_PATH = os.environ.get("SAFE_MEDIA_PATH", os.path.join(os.path.dirname(__file__), "safe_media")) | |
| ALLOW_LOCAL_FILES = is_env_enabled("ALLOW_LOCAL_FILES", "1") | |
| def dictify(data: "BaseModel") -> dict[str, Any]: | |
| try: # pydantic v2 | |
| return data.model_dump(exclude_unset=True) | |
| except AttributeError: # pydantic v1 | |
| return data.dict(exclude_unset=True) | |
| def jsonify(data: "BaseModel") -> str: | |
| try: # pydantic v2 | |
| return json.dumps(data.model_dump(exclude_unset=True), ensure_ascii=False) | |
| except AttributeError: # pydantic v1 | |
| return data.json(exclude_unset=True, ensure_ascii=False) | |
| def check_lfi_path(path: str) -> None: | |
| """Checks if a given path is vulnerable to LFI. Raises HTTPException if unsafe.""" | |
| if not ALLOW_LOCAL_FILES: | |
| raise HTTPException(status_code=status.HTTP_403_FORBIDDEN, detail="Local file access is disabled.") | |
| try: | |
| os.makedirs(SAFE_MEDIA_PATH, exist_ok=True) | |
| real_path = os.path.realpath(path) | |
| safe_path = os.path.realpath(SAFE_MEDIA_PATH) | |
| if not real_path.startswith(safe_path): | |
| raise HTTPException( | |
| status_code=status.HTTP_403_FORBIDDEN, detail="File access is restricted to the safe media directory." | |
| ) | |
| except Exception: | |
| raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST, detail="Invalid or inaccessible file path.") | |
| def check_ssrf_url(url: str) -> None: | |
| """Checks if a given URL is vulnerable to SSRF. Raises HTTPException if unsafe.""" | |
| try: | |
| parsed_url = urlparse(url) | |
| if parsed_url.scheme not in ["http", "https"]: | |
| raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST, detail="Only HTTP/HTTPS URLs are allowed.") | |
| hostname = parsed_url.hostname | |
| if not hostname: | |
| raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST, detail="Invalid URL hostname.") | |
| ip_info = socket.getaddrinfo(hostname, parsed_url.port) | |
| ip_address_str = ip_info[0][4][0] | |
| ip = ipaddress.ip_address(ip_address_str) | |
| if not ip.is_global: | |
| raise HTTPException( | |
| status_code=status.HTTP_403_FORBIDDEN, | |
| detail="Access to private or reserved IP addresses is not allowed.", | |
| ) | |
| except socket.gaierror: | |
| raise HTTPException( | |
| status_code=status.HTTP_400_BAD_REQUEST, detail=f"Could not resolve hostname: {parsed_url.hostname}" | |
| ) | |
| except Exception as e: | |
| raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST, detail=f"Invalid URL: {e}") | |