GPI: GenAI-Powered Inference
Getting Started
Installation
From PyPI
From Source
What’s GPI?
Generative-AI Powered Inference
Contribute to GPI
How to use GPU
What’s GPU?
What if you do not have GPU?
Google Colaboratory
Data Generation
Generating Texts with LLaMa3
How to use LLaMa3
Creating Texts
Repeating Texts
Arguments
System Prompt
Generating Texts with Other LLMs
Example: Gemma2
Basic Operation
Text-As-Treatment
What is Text-As-Treatment?
How to estimate treatment effects
Step 1: Load the Internal Representations
Step 2: Estimate the Treatment Effects
How to control confounders
Method 1: Using a Formula with a DataFrame
Method 2: Using a Design Matrix
Visualizing Propensity Scores
Hyperparameters
Advanced Operations
Hyperparameter Tuning
Automated Hyperparameter Tuning
List of Hyperparameters
Customizing Your Analysis
TarNet
Propensity Score Model
Estimation Workflow
When LLM is too big
Model Quantization
References
dml_score
Description
Arguments
Returns
Example Usage
estimate_k_ate
Description
Arguments
Returns
Example Usage
estimate_psi_split
Description
Arguments
Returns
Example Usage
extract_and_save_hiddens
Description
Arguments
Returns
Example Usage
generate_text
Description
Arguments
Returns
Example Usage
get_instruction
Description
Arguments
Returns
Example Usage
load_hiddens
Description
Arguments
Returns
Example Usage
save_generated_texts
Description
Arguments
Returns
Example Usage
SpectralNormClassifier
Description
Parameters
Example Usage
Methods
fit
predict_proba
predict
TarNet_loss
Description
Arguments
Returns
Example Usage
TarNet
Description
Parameters
Example Usage
Methods
fit
predict
TarNetBase
Description
Parameters
Example Usage
Arguments:
TarNetHyperparameterTuner
Description
Arguments
Example Usage
GPI: GenAI-Powered Inference
Index
Index