Text Generation
Transformers
Safetensors
Persian
gemma
neura
medical
DrNeura
text-generation-inference
4-bit precision
bitsandbytes
Run this model with HF Jobs
Run Neurai/NeuraMedicalGemma7b on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/Neurai/NeuraMedicalGemma7b. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/Neurai/NeuraMedicalGemma7b on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/Neurai/NeuraMedicalGemma7b. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/Neurai/NeuraMedicalGemma7b. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use Neurai/NeuraMedicalGemma7b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Neurai/NeuraMedicalGemma7b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Neurai/NeuraMedicalGemma7b")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Neurai/NeuraMedicalGemma7b") model = AutoModelForCausalLM.from_pretrained("Neurai/NeuraMedicalGemma7b", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Neurai/NeuraMedicalGemma7b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Neurai/NeuraMedicalGemma7b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Neurai/NeuraMedicalGemma7b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Neurai/NeuraMedicalGemma7b
- SGLang
How to use Neurai/NeuraMedicalGemma7b 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 "Neurai/NeuraMedicalGemma7b" \ --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": "Neurai/NeuraMedicalGemma7b", "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 "Neurai/NeuraMedicalGemma7b" \ --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": "Neurai/NeuraMedicalGemma7b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Neurai/NeuraMedicalGemma7b with Docker Model Runner:
docker model run hf.co/Neurai/NeuraMedicalGemma7b
Neura Orca Gemma 7B
Model Description
- Developed by: Neura company
- Funded by: Neura
- Model type: gemma7b
- Language(s) (NLP): Persian
- Finetuned from model: google/gemma-7b-it
Model Sources
- Repository: https://huggingface.co/google/gemma-7b-it
Uses
Check out the Google Colab demo to run NeuraOrcaGemma7b on a free-tier Google Colab instance:
make sure these packages are installed:
!pip install --no-deps xformers accelerate bitsandbytes
!pip install -q -U transformers
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
import torch
import os
MODEL_PATH = "Neurai/NeuraMedicalGemma7b"
quantization_config = BitsAndBytesConfig(
load_in_4bit = True,
bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype=torch.bfloat16,
bnb_4bit_use_double_quant=True,
)
model = AutoModelForCausalLM.from_pretrained(
MODEL_PATH,
device_map = "auto",
trust_remote_code = True,
quantization_config=quantization_config,
)
tokenizer = AutoTokenizer.from_pretrained(MODEL_PATH)
input_prompt = """
### Instruction:{}
### Input:{}
### Response:{}"""
input_text = input_prompt.format(
"انگشت شصت دستم با درد باز میشود عکس ام آر آی هم گرفتم اثری از شکستگی نیست تشخیص تو چیه؟",
"",
""
)
inputs = tokenizer([input_text], return_tensors = "pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens = 300, use_cache = True)
response = tokenizer.batch_decode(outputs)[0]
Generated text :
بر اساس علائم و نتایج تصویربرداری،
به نظر میرسد که شما ممکن است از سندرم تونل کارپال رنج ببرید.
این وضعیت زمانی رخ می دهد که عصب مدیان در مچ دست شما فشرده یا فشرده می شود.
در مورد شما، ممکن است که ضربه به انگشت شست شما باعث این فشردگی شده باشد. <eos>
More Information
Model Card Authors
Esmaeil Zahedi, Mohsen Yazdinejad
Model Card Contact
- Downloads last month
- 23