kenyano's picture
Update README.md
175c05c verified
|
raw
history blame
8.76 kB
---
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
<!-- Provide a quick summary of what the model is/does. -->
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
<!-- Provide a longer summary of what this model is. -->
- **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]
<!-- Provide the basic links for the model. -->
- **Repository:** [More Information Needed]
- **Paper [optional]:** [More Information Needed]
- **Demo [optional]:** [More Information Needed]
## Uses
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
### Direct Use
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
[More Information Needed]
### Downstream Use [optional]
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
[More Information Needed]
### Out-of-Scope Use
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
[More Information Needed]
## Bias, Risks, and Limitations
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
[More Information Needed]
### Recommendations
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
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
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
[More Information Needed]
### Training Procedure
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
#### Preprocessing [optional]
[More Information Needed]
#### Training Hyperparameters
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
#### Speeds, Sizes, Times [optional]
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
[More Information Needed]
## Evaluation
<!-- This section describes the evaluation protocols and provides the results. -->
### Testing Data, Factors & Metrics
#### Testing Data
<!-- This should link to a Dataset Card if possible. -->
[More Information Needed]
#### Factors
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
[More Information Needed]
#### Metrics
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
[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]
<!-- Relevant interpretability work for the model goes here -->
[More Information Needed]
## Environmental Impact
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
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]
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
**BibTeX:**
[More Information Needed]
**APA:**
[More Information Needed]
## Glossary [optional]
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
[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)
```python