TxGemma API is a collection of open-source machine learning models designed to generate predictions, classifications, or text based on therapeutic-related data.

Features of TxGemma
TxGemma is a collection of AI models fine-tuned from Google’s Gemma architecture, specifically tailored for therapeutic applications. Key features include:
- Specialized Training: TxGemma models are trained on approximately 7 million examples pertinent to therapeutic tasks, enabling them to predict properties of therapeutic entities throughout the drug discovery process.
- Model Variants: The suite comprises models of varying sizes—2 billion (2B), 9 billion (9B), and 27 billion (27B) parameters—to accommodate diverse computational resources and application needs.
- Predict and Chat Versions: Each model size offers a ‘predict’ version for specific tasks like toxicity prediction and a ‘chat’ version for conversational data analysis, facilitating complex queries and multi-turn discussions.
Performance Metrics of TxGemma
The performance of these models has been rigorously evaluated across various therapeutic tasks:
- Benchmarking: The 27B predict version demonstrates superior performance, outperforming or matching previous state-of-the-art models on 64 out of 66 tasks, and surpassing specialized models on 26 tasks.
- Task Versatility: It excels in classification (e.g., predicting blood-brain barrier permeability), regression (e.g., estimating drug binding affinity), and generation tasks (e.g., deducing reactant sets from reaction products).

Technical Specifications
The architecture and training methodologies are pivotal to its capabilities:
- Foundation Model: Built upon Google’s Gemma architecture, TxGemma leverages decoder-only transformer models optimized for text generation tasks.
- Training Data: The models are fine-tuned using a diverse dataset of 7 million therapeutic examples, enhancing their predictive accuracy in drug development contexts.
- Computational Efficiency: Designed to balance performance with computational demands, TxGemma models are accessible to researchers with varying resources.
Evolution from Tx-LLM to TxGemma
These models represent an evolution from their predecessor, Tx-LLM:
- Enhanced Accessibility: While Tx-LLM garnered significant interest, TxGemma offers open models at practical scales, facilitating broader adoption and customization.
- Improved Performance: TxGemma models exhibit enhanced predictive capabilities, rivaling specialized models across numerous therapeutic tasks.
Advantages of TxGemma
The adoption of these models in therapeutic development offers several advantages:
- Accelerated Drug Discovery: By accurately predicting properties of therapeutic entities, TxGemma can reduce the time and cost associated with bringing new therapies to market.
- Open-Source Accessibility: As open models, TxGemma allows researchers to fine-tune and adapt the models to specific datasets and tasks, fostering innovation and collaboration.
- Versatility: The availability of models in different sizes and versions enables application across a spectrum of tasks, from predictive analytics to conversational data analysis.
Technical Indicators
Technical performance is underscored by several indicators:
- Parameter Efficiency: Despite varying in size, all TxGemma models maintain a balance between complexity and computational efficiency, ensuring accessibility for users with different resource capacities.
- Instruction Tuning: The ‘chat’ versions incorporate general instruction tuning data, enabling them to explain reasoning and engage in complex discussions, thereby enhancing interpretability.
Application Scenarios
The versatility allows for application across various stages of therapeutic development:
- Target Identification: Assisting in pinpointing promising biological targets for new therapies.
- Drug Property Prediction: Evaluating potential safety, efficacy, and bioavailability of drug candidates.
- Clinical Trial Outcome Prediction: Anticipating potential outcomes of clinical trials, aiding in better trial design and resource allocation.
Usage Tips
To maximize the benefits:
- Fine-Tuning: Utilize the provided Colab notebook to fine-tune TxGemma models with proprietary data, enhancing predictive accuracy for specific applications.
- Integration with Agentic Systems: Incorporate TxGemma into agentic systems like Agentic-Tx to tackle complex, multi-step research problems, leveraging its reasoning capabilities alongside other tools.
- Optimal Sampling Parameters: When using it for text generation, configure sampling parameters appropriately (e.g., temperature: 1.0, top-k: 64, top-p: 0.95) .
See Also Grok 3 API
Conclusion
Google AI released these models with the intention of improving our world and increasing efficiency. They are more than just tools; they help promote development across industries, languages, and ethics.
Artificial intelligence opens the door to new horizons. However, when making choices related to such technologies, we should always seek safety first. Using Google AI advantages will help us build all AI projects responsibly.
How to call TxGemma API from CometAPI
1.Log in to cometapi.com. If you are not our user yet, please register first.
2.Get the access credential API key of the interface. Click “Add Token” at the API token in the personal center, get the token key: sk-xxxxx and submit.
3. Get the url of this site: https://api.cometapi.com/
4. Select TxGemma to send the API request and set the request body. The request method and request body are obtained from our website API doc. Our website also provides Apifox test for your convenience.
5. Process the API response to get the generated answer. After sending the API request, you will receive a JSON object containing the generated completion.