# Run alphagenome locally

**URL:** <https://www.alphagenomecommunity.com/t/run-alphagenome-locally/775>\
**Category:** Help & Support\
**Created:** [February 5, 2026, 8:34am UTC](https://www.alphagenomecommunity.com/t/run-alphagenome-locally/775 "2026-02-05T08:34:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![chujie\_sun](https://yyz2.discourse-cdn.com/watermelon/user_avatar/www.alphagenomecommunity.com/chujie_sun/32/904_2.png) [@chujie\_sun](https://www.alphagenomecommunity.com/u/chujie_sun)\
**Post date:** [February 5, 2026, 8:34am UTC](https://www.alphagenomecommunity.com/t/run-alphagenome-locally/775/1 "2026-02-05T08:34:45Z")

</div>

Hi, thanks for developing alphagenome. Because the GPU servers in our lab do not have internet access, we are unable to use the API to call AlphaGenome. Therefore, I am trying to run AlphaGenome locally.

I have downloaded the model parameter files as well as the reference files, and constructed the `dna_model` using the code below.

`from alphagenome_research.model import dna_model`

```auto
model = dna_model.create(  

    checkpoint_path='/home/alphagenome_research-main/model/alphagenome-all-folds/',  

    organism_settings={  

        dna_model.Organism.HOMO_SAPIENS: dna_model.OrganismSettings(  

            fasta_path='/home/alphagenome_research-main/Hs_ref/GRCh38.p13.genome.fa',  

            gtf_feather_path='/home/alphagenome_research-main/Hs_ref/gencode.v46.annotation.gtf.gz.feather',  

            pas_feather_path='/home/alphagenome_research-main/Hs_ref/polyadb_human_v3_exon3_contiguous_gtfv46.feather',  

            splice_site_starts_feather_path='/home/alphagenome_research-main/Hs_ref/gencode.v46.splice_sites_starts.feather',  

            splice_site_ends_feather_path='/home/alphagenome_research-main/Hs_ref/gencode.v46.splice_sites_ends.feather',  

        )  

    },  

    device=jax.local_devices()[0],  

)

 

```

Then I run the example codes:

```auto
interval = genome.Interval(chromosome='chr22', start=35677410, end=36725986)
variant = genome.Variant(
    chromosome='chr22',
    position=36201698,
    reference_bases='A',
    alternate_bases='C',
)

outputs = model.predict_variant(
    interval=interval,
    variant=variant,
    ontology_terms=['UBERON:0001157'],
    requested_outputs=[dna_model.OutputType.RNA_SEQ],
)

```

However, I encountered the following error:

```auto
ValueError Traceback (most recent call last)
Cell In[9], line 9
      1 interval = genome.Interval(chromosome='chr22', start=35677410, end=36725986)
      2 variant = genome.Variant(
      3 chromosome='chr22',
      4 position=36201698,
      5 reference_bases='A',
      6 alternate_bases='C',
      7 )
----> 9 outputs = model.predict_variant(
     10 interval=interval,
     11 variant=variant,
     12 ontology_terms=['UBERON:0001157'],
     13 requested_outputs=[dna_model.OutputType.RNA_SEQ],
     14 )

File ~/softwares/alphagenome_research-main/src/alphagenome_research/model/dna_model.py:625, in AlphaGenomeModel.predict_variant(self, interval, variant, organism, requested_outputs, ontology_terms)
    615 alternate_sequence = jax.device_put(
    616 np.asarray(self._one_hot_encoder.encode(alternate_sequence))[
    617 np.newaxis
    618 ],
    619 device,
    620 )
    621 organism_indices = jax.device_put(
...
    692 f"{fq_name!r} with retrieved shape {param.shape!r} does not match "
    693 f"shape={shape!r} dtype={dtype!r}")
    695 return param

ValueError: 'alphagenome/embed/embeddings' with retrieved shape (2, 1536) does not match shape=[1, 1536] dtype=<class 'jax.numpy.float32'>

```

Could you please advise what might be causing this issue? Thank you very much.

---

<div class="post-metadata">

**Author:** ![tward](https://yyz2.discourse-cdn.com/watermelon/user_avatar/www.alphagenomecommunity.com/tward/32/17_2.png) [@tward](https://www.alphagenomecommunity.com/u/tward)\
**Post date:** [February 5, 2026, 3:30pm UTC](https://www.alphagenomecommunity.com/t/run-alphagenome-locally/775/2 "2026-02-05T15:30:37Z")

</div>

Hi @chujie_sun, welcome to the community!

Ah, this is because our model parameters assume that you have 2 organisms, whereas you’re only passing 1 organism into the settings. We’ll look to make this better, but in the meantime, can you try this:

```python
from alphagenome_research.model import dna_model

model = dna_model.create(
    checkpoint_path='/path/to/checkpoint',
    organism_settings={
        dna_model.Organism.HOMO_SAPIENS: dna_model.OrganismSettings(),
        dna_model.Organism.MUS_MUSCULUS: (
            dna_model.OrganismSettings()
        ), # Add empty mouse settings
    },
)

```

Specifically, adding an empty `MUS_MUSCULUS` organism setting entry will ensure the model params are loaded correctly.

Hopefully this unblocks you!

Tom

---

<div class="post-metadata">

**Author:** ![chujie\_sun](https://yyz2.discourse-cdn.com/watermelon/user_avatar/www.alphagenomecommunity.com/chujie_sun/32/904_2.png) [@chujie\_sun](https://www.alphagenomecommunity.com/u/chujie_sun)\
**Post date:** [February 6, 2026, 1:53am UTC](https://www.alphagenomecommunity.com/t/run-alphagenome-locally/775/3 "2026-02-06T01:53:17Z")

</div>

Hi Tom, thanks for your reply. Now it works correctly.

Chujie

---

<div class="post-metadata">

**Author:** ![Ling\_Zheng](https://yyz2.discourse-cdn.com/watermelon/user_avatar/www.alphagenomecommunity.com/ling_zheng/32/870_2.png) [@Ling\_Zheng](https://www.alphagenomecommunity.com/u/Ling_Zheng)\
**Post date:** [February 12, 2026, 8:22am UTC](https://www.alphagenomecommunity.com/t/run-alphagenome-locally/775/6 "2026-02-12T08:22:40Z")

</div>

why two organisms？ Could you explain more about it？ thx

---

<div class="post-metadata">

**Author:** ![tward](https://yyz2.discourse-cdn.com/watermelon/user_avatar/www.alphagenomecommunity.com/tward/32/17_2.png) [@tward](https://www.alphagenomecommunity.com/u/tward)\
**Post date:** [February 12, 2026, 8:50pm UTC](https://www.alphagenomecommunity.com/t/run-alphagenome-locally/775/7 "2026-02-12T20:50:18Z")

</div>

Our model was trained on two organisms, so the pre-trained weights include embedding layers for both organisms. You can read mode in the supplementary materials in the [Nature publication](https://www.nature.com/articles/s41586-025-10014-0).

The workaround above should no longer be needed as of [commit 1af7e36](https://github.com/google-deepmind/alphagenome_research/commit/1af7e36ca7c85be0e497931aab5f9221fd5037ef), where we default to 2 organisms instead of inferring from the provided metadata.

Thanks!
