--- license: llama3 language: - en - ja - zh base_model: - meta-llama/Meta-Llama-3-8B pipeline_tag: text-generation library_name: transformers --- # Model Card for Model ID This modelcard aims to be a base template for new models. It has been generated using [this raw template](https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/templates/modelcard_template.md?plain=1). ## Model Details ### Model Description - **Developed by:** [More Information Needed] - **Funded by [optional]:** [More Information Needed] - **Shared by [optional]:** [More Information Needed] - **Model type:** [More Information Needed] - **Language(s) (NLP):** [More Information Needed] - **License:** [More Information Needed] - **Finetuned from model [optional]:** [More Information Needed] ### Model Sources [optional] - **Repository:** [More Information Needed] - **Paper [optional]:** [More Information Needed] - **Demo [optional]:** [More Information Needed] ## Uses ### Direct Use [More Information Needed] ### Downstream Use [optional] [More Information Needed] ### Out-of-Scope Use [More Information Needed] ## Bias, Risks, and Limitations [More Information Needed] ### Recommendations Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations. ## How to Get Started with the Model Use the code below to get started with the model. [More Information Needed] ## Training Details ### Training Data [More Information Needed] ### Training Procedure #### Preprocessing [optional] [More Information Needed] #### Training Hyperparameters - **Training regime:** [More Information Needed] #### Speeds, Sizes, Times [optional] [More Information Needed] ## Evaluation ### Testing Data, Factors & Metrics #### Testing Data [More Information Needed] #### Factors [More Information Needed] #### Metrics [More Information Needed] ### Results | | EN | | | | | |--------------------------|-----------|-------|-------|---------|----------| | Model | MedQA-4op | MedQA | MMLU | MedMCQA | PubMedQA | | Gemma -7B | 52.92 | 47.56 | 69.74 | 48.67 | 73.44 | | Llama2 -7B | 36.59 | 28.79 | 44.19 | 36.27 | 32.80 | | Llama3 -8B | 58.52 | 52.76 | 70.02 | 55.25 | 75.05 | | Swallow -8B -v0.1 | 47.87 | 45.66 | 65.87 | 49.99 | 64.39 | | med alpaca -7B | 37.62 | 30.99 | 51.75 | 34.23 | 39.84 | | Meditron -7B | 35.09 | 29.10 | 46.96 | 29.88 | 20.52 | | Open BioLLM -8B | 40.14 | 50.08 | 73.15 | 56.23 | 65.39 | | DISC -MedLLM | 37.46 | 32.89 | 50.00 | 36.96 | 33.20 | | Apollo -7B | 54.97 | 49.68 | 68.73 | 53.48 | 75.86 | | ELAINE -medLLM | 56.15 | 50.39 | 67.62 | 53.74 | 71.83 | | ELAINE -medLLM -instruct | 58.36 | 55.84 | 72.79 | 54.48 | 73.24 | | | | ZH | | | JA | | | |--------------------------|-----------|-------|--------|---------|---------|-------| | Model | MedQA-4op | MedQA | CMExam | JJSIMQA | IgakuQA | DenQA | | Gemma -7B | 48.90 | 44.55 | 38.60 | 27.61 | 35.80 | 25.14 | | Llama2 -7B | 29.52 | 24.85 | 23.55 | 12.61 | 17.45 | 17.08 | | Llama3 -8B | 51.42 | 44.64 | 39.41 | 28.91 | 33.20 | 23.47 | | Swallow -8B -v0.1 | 47.35 | 40.84 | 35.94 | 37.83 | 45.15 | 29.03 | | med alpaca -7B | 30.81 | 25.17 | 23.40 | 14.35 | 16.55 | 10.83 | | Meditron -7B | 31.10 | 24.47 | 22.61 | 13.48 | 18.15 | 15.56 | | Open BioLLM -8B | 50.37 | 42.59 | 24.59 | 20.87 | 31.50 | 14.44 | | DISC -MedLLM | 47.18 | 46.13 | 41.57 | 23.26 | 27.15 | 23.47 | | Apollo -7B | 65.19 | 60.98 | 51.40 | 25.00 | 37.40 | 24.72 | | ELAINE -medLLM | 57.50 | 52.44 | 44.99 | 35.65 | 45.75 | 29.86 | | ELAINE -medLLM -instruct | 61.59 | 55.71 | 47.19 | 35.22 | 46.35 | 32.36 | #### Summary ## Model Examination [optional] [More Information Needed] ## Environmental Impact Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700). - **Hardware Type:** [More Information Needed] - **Hours used:** [More Information Needed] - **Cloud Provider:** [More Information Needed] - **Compute Region:** [More Information Needed] - **Carbon Emitted:** [More Information Needed] ## Technical Specifications [optional] ### Model Architecture and Objective [More Information Needed] ### Compute Infrastructure [More Information Needed] #### Hardware [More Information Needed] #### Software [More Information Needed] ## Citation [optional] **BibTeX:** [More Information Needed] **APA:** [More Information Needed] ## Glossary [optional] [More Information Needed] ## More Information [optional] [More Information Needed] ## Model Card Authors [optional] [More Information Needed] ## Model Card Contact ## Usage ```python import string, time from vllm import LLM, SamplingParams import torch model_name = "kenyano/ELAINE_medLLM" vllm_paralell = 1 questions_ja = [ "尿酸値の値はどこまでが正常値ですか?", ] questions_en = [ "What is the normal level of uric acid levels?" , ] questions_zh = [ "尿酸的正常水平是多少?", ] llm = LLM(model=model_name, trust_remote_code=True, tensor_parallel_size=vllm_paralell, dtype="half", max_model_len=8192) sampling_params = SamplingParams(temperature=0.2, top_p=0.8, max_tokens=200, min_tokens=50) def generate(questions): prompts = [f"Human: \n{question}\n\nAssistant: \n" for question in questions] outputs = llm.generate(prompts,sampling_params) for i, output in enumerate(outputs): prompt = output.prompt generated_text = output.outputs[0].text print("-"*5, "prompt", "-"*5) print(f'{prompt}') print("-"*5, "generaated", "-"*5) print(f'{generated_text}\n') generate(questions_ja) generate(questions_en) generate(questions_zh) ```