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 json | |
| import logging | |
| import time | |
| import fire | |
| from datasets import load_dataset | |
| try: | |
| import jieba # type: ignore | |
| from nltk.translate.bleu_score import SmoothingFunction, sentence_bleu # type: ignore | |
| from rouge_chinese import Rouge # type: ignore | |
| jieba.setLogLevel(logging.CRITICAL) | |
| jieba.initialize() | |
| except ImportError: | |
| print("Please install llamafactory with `pip install -r requirements/metrics.txt`.") | |
| raise | |
| def compute_metrics(sample): | |
| hypothesis = list(jieba.cut(sample["predict"])) | |
| reference = list(jieba.cut(sample["label"])) | |
| bleu_score = sentence_bleu( | |
| [list(sample["label"])], | |
| list(sample["predict"]), | |
| smoothing_function=SmoothingFunction().method3, | |
| ) | |
| if len(" ".join(hypothesis).split()) == 0 or len(" ".join(reference).split()) == 0: | |
| result = {"rouge-1": {"f": 0.0}, "rouge-2": {"f": 0.0}, "rouge-l": {"f": 0.0}} | |
| else: | |
| rouge = Rouge() | |
| scores = rouge.get_scores(" ".join(hypothesis), " ".join(reference)) | |
| result = scores[0] | |
| metric_result = {} | |
| for k, v in result.items(): | |
| metric_result[k] = round(v["f"] * 100, 4) | |
| metric_result["bleu-4"] = round(bleu_score * 100, 4) | |
| return metric_result | |
| def main(filename: str): | |
| start_time = time.time() | |
| dataset = load_dataset("json", data_files=filename, split="train") | |
| dataset = dataset.map(compute_metrics, num_proc=8, remove_columns=dataset.column_names) | |
| score_dict = dataset.to_dict() | |
| average_score = {} | |
| for task, scores in sorted(score_dict.items(), key=lambda x: x[0]): | |
| print(f"{task}: {sum(scores) / len(scores):.4f}") | |
| average_score[task] = sum(scores) / len(scores) | |
| with open("predictions_score.json", "w", encoding="utf-8") as f: | |
| json.dump(average_score, f, indent=4) | |
| print(f"\nDone in {time.time() - start_time:.3f}s.\nScore file saved to predictions_score.json") | |
| if __name__ == "__main__": | |
| fire.Fire(main) | |