Instructions to use EQUES/JPharmatron-7B-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use EQUES/JPharmatron-7B-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="EQUES/JPharmatron-7B-base") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("EQUES/JPharmatron-7B-base") model = AutoModelForCausalLM.from_pretrained("EQUES/JPharmatron-7B-base") 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 EQUES/JPharmatron-7B-base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "EQUES/JPharmatron-7B-base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "EQUES/JPharmatron-7B-base", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/EQUES/JPharmatron-7B-base
- SGLang
How to use EQUES/JPharmatron-7B-base 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 "EQUES/JPharmatron-7B-base" \ --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": "EQUES/JPharmatron-7B-base", "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 "EQUES/JPharmatron-7B-base" \ --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": "EQUES/JPharmatron-7B-base", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use EQUES/JPharmatron-7B-base with Docker Model Runner:
docker model run hf.co/EQUES/JPharmatron-7B-base
JPharmatron-7B-base
JPharmatron-7B-base is a 7B large language model designed for pharmaceutical applications and researches.
Model Details
Model Description
The JPharmatron-7B-base is continually pre-trained using 2B tokens from Japanese datasets, based on Qwen2.5-7B.
- Developed by: EQUES Inc.
- Funded by [optional]: GENIAC Project
- Model type: Causal decoder-only
- Language(s) (NLP): Japanese, English
- License: CC-BY-SA-4.0
Model Sources [optional]
- Repository: https://github.com/EQUES-Inc/pharma-LLM-eval
- Paper [optional]: A Japanese Language Model and Three New Evaluation Benchmarks for Pharmaceutical NLP (IJCNLP-AACL 2025)
Uses
This model has not undergone any post-training including instruction fine-tuning. Therefore, direct use of this model for downstream tasks is not recommended. Also, it is not validated for medical use or any other risk-sensitive use.
Citation [optional]
This paper has been accepted to IJCNLP-AACL 2025.
BibTeX:
@inproceedings{ono-etal-2025-japanese,
title = "A {J}apanese Language Model and Three New Evaluation Benchmarks for Pharmaceutical {NLP}",
author = "Ono, Shinnosuke and
Sukeda, Issey and
Fujii, Takuro and
Buma, Kosei and
Sasaki, Shunsuke",
editor = "Inui, Kentaro and
Sakti, Sakriani and
Wang, Haofen and
Wong, Derek F. and
Bhattacharyya, Pushpak and
Banerjee, Biplab and
Ekbal, Asif and
Chakraborty, Tanmoy and
Singh, Dhirendra Pratap",
booktitle = "Proceedings of the 14th International Joint Conference on Natural Language Processing and the 4th Conference of the Asia-Pacific Chapter of the Association for Computational Linguistics",
month = dec,
year = "2025",
address = "Mumbai, India",
publisher = "The Asian Federation of Natural Language Processing and The Association for Computational Linguistics",
url = "https://aclanthology.org/2025.ijcnlp-long.72/",
pages = "1316--1332",
ISBN = "979-8-89176-298-5",
abstract = "We present **JPharmatron**, a Japanese domain-specific large language model (LLM) for the pharmaceutical field, developed through continual pre-training on two billion Japanese pharmaceutical tokens and eight billion English biomedical tokens. For rigorous evaluation, we introduce **JPharmaBench**, a benchmark suite consisting of three new benchmarks: YakugakuQA, based on national pharmacist licensing exams; NayoseQA, which tests cross-lingual synonym and terminology normalization; and SogoCheck, a novel task involving cross-document consistency checking.We evaluate our model against open-source medical LLMs and commercial models, including GPT-4o. Experimental results show that **JPharmatron** outperforms existing open models and achieves competitive performance with commercial ones.Interestingly, even GPT-4o performs poorly on SogoCheck, suggesting that cross-sentence consistency reasoning remains an open challenge.**JPharmatron** enables secure and local model deployment for pharmaceutical tasks, where privacy and legal constraints limit the use of closed models. Besides, **JPharmaBench** offers a reproducible framework for evaluating Japanese pharmaceutical natural language processing. Together, they demonstrate the feasibility of practical and cost-efficient language models for Japanese healthcare and pharmaceutical sectors.Our model, codes, and datasets are available on HuggingFace: https://huggingface.co/collections/EQUES/jpharmatron and https://huggingface.co/collections/EQUES/jpharmabench."
}
More Information [optional]
See our conference paper: A Japanese Language Model and Three New Evaluation Benchmarks for Pharmaceutical NLP.
Model Card Authors [optional]
- Downloads last month
- -