Instructions to use karunakant/vedalytics-gemma4E4B-chemistry with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use karunakant/vedalytics-gemma4E4B-chemistry with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "question-answering" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # pip install "transformers<5.0.0" from transformers import pipeline pipe = pipeline("question-answering", model="karunakant/vedalytics-gemma4E4B-chemistry")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("karunakant/vedalytics-gemma4E4B-chemistry", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use karunakant/vedalytics-gemma4E4B-chemistry with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf karunakant/vedalytics-gemma4E4B-chemistry # Run inference directly in the terminal: llama cli -hf karunakant/vedalytics-gemma4E4B-chemistry
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf karunakant/vedalytics-gemma4E4B-chemistry # Run inference directly in the terminal: llama cli -hf karunakant/vedalytics-gemma4E4B-chemistry
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf karunakant/vedalytics-gemma4E4B-chemistry # Run inference directly in the terminal: ./build/bin/llama cli -hf karunakant/vedalytics-gemma4E4B-chemistry
Use Docker
docker model run hf.co/karunakant/vedalytics-gemma4E4B-chemistry
- Llama new
- LM Studio
- Jan
- Ollama
How to use karunakant/vedalytics-gemma4E4B-chemistry with Ollama:
ollama run hf.co/karunakant/vedalytics-gemma4E4B-chemistry
- Unsloth Desktop
- Docker Model Runner
How to use karunakant/vedalytics-gemma4E4B-chemistry with Docker Model Runner:
docker model run hf.co/karunakant/vedalytics-gemma4E4B-chemistry
- Lemonade
How to use karunakant/vedalytics-gemma4E4B-chemistry with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull karunakant/vedalytics-gemma4E4B-chemistry
Run and chat with the model
lemonade run user.vedalytics-gemma4E4B-chemistry-{{QUANT_TAG}}List all available models
lemonade list
- Atomic Chat
🌟 Vedalytics Gemma 4 (E4B) — Chemistry & Spectroscopy Specialized Model
An expert language model fine-tuned for chemistry, NMR, IR, mass spectrometry, and spectroscopy, optimized for enterprise efficiency on both CPU and GPU.
🎯 Model Overview & Capabilities
Vedalytics Gemma 4 is a 4-billion parameter transformer model built on Google's Gemma architecture (Gemma 4-E4B), enhanced with high-precision quantization and enterprise-grade fine-tuning.
The model is specialized for:
- Organic Chemistry, Inorganic Chemistry, Analytical Chemistry
- Nuclear Magnetic Resonance (¹H, ¹³C, 2D NMR)
- Infrared (IR) and Raman Spectroscopy
- UV-Visible (UV-Vis) and Fluorescence Spectroscopy
- Mass Spectrometry (MS, LC-MS, GC-MS)
- Reaction Mechanisms, Synthesis, and Spectroscopy Interpretation
Key features:
- Domain-Specific Expertise: Trained on 5,000+ chemistry-focused Q&A pairs with industry terminology.
- Guardrails & Safety: Automatically rejects out-of-domain queries (e.g., general knowledge, history, programming) to maintain scientific integrity.
- Optimized for Inference:
- CPU: 4-bit or 8-bit quantization for high performance on standard Intel/AMD hardware.
- GPU: Full 16-bit or 32-bit precision with Tensor Core acceleration on NVIDIA/DGX systems.
- Mac Metal: Metal Performance Shaders support for optimal Apple Silicon (M1/M2/M3/M4) performance.
The fine-tuned model is constrained to only respond to questions regarding Chemistry and Spectroscopy (organic/inorganic/analytical chemistry, NMR, IR, UV-Vis, Mass Spectrometry, Raman, etc.) and politely reject out-of-domain queries.
🚀 How to Get Started
Using Merged Model (PyTorch / Transformers)
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "./merged_model"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto"
)
prompt = "Explain chemical shift in 1H NMR spectroscopy."
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
outputs = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Using GGUF with Ollama or llama.cpp
# Run with Ollama
ollama run gemma-chem
# Run with llama.cpp
./llama-cli -m ./output_gguf/vedalytics-gemma4E4B-chemistry.gguf -t 8 -p "What is the IR peak for an alkyne group?"
🌐 Cross-Platform Deployment Guide (CPU, Mac Mini & DGX Spark)
1. Standard CPU Deployment (x86_64 / Intel / AMD)
- Compatibility: 100% Supported (No GPU required).
- Execution: The exported GGUF model uses
llama.cppAVX2 / AVX-512 CPU thread vectorization. - Commands:
- Ollama CPU:
ollama run gemma-chem - llama.cpp CLI:
./llama-cli -m ./output_gguf/vedalytics-gemma4E4B-chemistry.gguf -t 8 -p "Explain chemical shift in 1H NMR."
- Ollama CPU:
2. Apple Silicon Mac Mini (M1 / M2 / M3 / M4)
- Compatibility: 100% Supported with Metal & Unified Memory Acceleration.
- Performance: High inference speed (~40–70 tokens/sec) utilizing macOS Metal Performance Shaders (MPS).
- Commands:
- Ollama Mac:
ollama create gemma-chem -f Modelfile ollama run gemma-chem - llama.cpp (Metal):
./llama-cli -m ./output_gguf/vedalytics-gemma4E4B-chemistry.gguf -ngl 99 -p "What is the IR peak for an alkyne?"
- Ollama Mac:
3. NVIDIA DGX / Spark GPU Clusters
- Compatibility: 100% Supported with Enterprise CUDA / Tensor Core acceleration.
- Deployment:
- vLLM / Hugging Face: Deploy
merged_model/for multi-user REST API endpoints:from transformers import AutoModelForCausalLM, AutoTokenizer model = AutoModelForCausalLM.from_pretrained("./merged_model", device_map="cuda") - Ollama / llama.cpp (CUDA): Load
.gguffile with 100% CUDA layer offloading (-ngl 99).
- vLLM / Hugging Face: Deploy
📊 Cross-Platform Feature Comparison Matrix
| Environment | Acceleration Engine | Est. Speed | Recommended Format |
|---|---|---|---|
| Standard CPU | CPU AVX2 / AVX-512 | ~15 – 30 tokens/sec | GGUF (f16 or q4_k_m) |
| Mac Mini (Apple Silicon) | Apple Metal (Unified RAM) | ~40 – 70 tokens/sec | GGUF (f16 or q8_0) |
| NVIDIA DGX / Spark Cluster | CUDA / Tensor Cores | ~100+ tokens/sec | Merged Model (merged_model) or GGUF |
🛠️ Framework Versions
- PEFT: 0.20.0
- TRL: 1.10.0
- Transformers: 5.16.1
- PyTorch: 2.11.0
- Downloads last month
- -
We're not able to determine the quantization variants.