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.

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

Uses

Check out the Google Colab demo to run NeuraOrcaGemma7b on a free-tier Google Colab instance: Open In Colab

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

https://neura.info

Model Card Authors

Esmaeil Zahedi, Mohsen Yazdinejad

Model Card Contact

info@neura.info

Downloads last month
23
Safetensors
Model size
9B params
Tensor type
F32
·
F16
·
U8
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support