ollama_deepseek-r1
Example interacting with deepseek-r1 from Python
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 4 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.0%) to scientific vocabulary
Repository
Example interacting with deepseek-r1 from Python
Basic Info
- Host: GitHub
- Owner: TheOpenScienceNerd
- License: mit
- Language: Jupyter Notebook
- Default Branch: main
- Size: 30.3 KB
Statistics
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
- Releases: 2
Metadata Files
README.md
DeepSeek-R1: research setup for working with Ollama, Python DeepSeek locally.
The materials in this repo provide a example Python code to prompt a local installation of DeepSeek-R1 using the python package ollama
See ollama documentation for installing LLMs locally on your machine.
License
The materials have been made available under an MIT license. The materials are as-is with no liability for the author. Please provide credit if you reuse the code in your own work.
Citation
Please feel free to use or adapt the code for your own work. But if so then a citation would be very much appreciated!
bibtex
@software{ollama_deepseekr1,
author = {Monks, Thomas },
license = {MIT},
title = {{@TheOpenScienceNerd: Interacting with DeepSeek-R1 via Python}},
url = {https://github.com/TheOpenScienceNerd/ollama_deepseek-r1},
doi = {https://doi.org/10.5281/zenodo.14876187}
}
Installation instructions
Installing dependencies
All dependencies can be found in environment.yml and are pulled from conda-forge. To run the code locally, we recommend installing miniforge;
miniforge is Free and Open Source Software (FOSS) alternative to Anaconda and miniconda that uses conda-forge as the default channel for packages. It installs both conda and mamba (a drop in replacement for conda) package managers. We recommend mamba for faster resolving of dependencies and installation of packages.
navigating your terminal (or cmd prompt) to the directory containing the repo and issuing the following command:
bash
mamba env create -f environment.yml
Activate the mamba environment using the following command:
bash
mamba activate ollama
Run Jupyter-lab
bash
jupyter-lab
Repo overview
.
├── binder
│ └──
├── callcentresim
│ ├── __init__.py
│ ├── model.py
│ └── output_analysis.py
├── CHANGELOG.md
├── CITATION.cff
├── environment.yml
├── LICENSE
├── 01_prompt_deepseek.ipynb
├── 02_conversations.ipynb
└── README.md
environment.yml- contains the conda environment if you wish to work locally algorithm01_prompt_deepseek.ipynb- main notebook file containing the tutorial code for the interacting with a local deepseek-r1 via python.02_conversations.ipynb-tutorial to setup conversation history as context (data) and pass that to a local LLM viaollama.CHANGES.md- changelog with record of notable changes to project between versions.CITATION.cff- citation information for the package.LICENSE- details of the MIT permissive license of this work.
Owner
- Name: TheOpenScienceNerd
- Login: TheOpenScienceNerd
- Kind: organization
- Location: United Kingdom
- Website: https://www.youtube.com/@TheOpenScienceNerd
- Repositories: 1
- Profile: https://github.com/TheOpenScienceNerd
Citation (CITATION.cff)
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!
cff-version: 1.2.0
title: '@TheOpenScienceNerd: Interacting with DeepSeek-R1 via Python'
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: 'Thomas '
family-names: Monks
affiliation: University of Exeter
orcid: 'https://orcid.org/0000-0003-2631-4481'
repository-code: 'https://github.com/TheOpenScienceNerd/replications-algorithm'
keywords:
- DeepSeek
- Ollama
- python
- open science
license: MIT
GitHub Events
Total
- Release event: 2
- Watch event: 1
- Public event: 1
- Push event: 8
- Pull request event: 2
- Fork event: 1
- Create event: 3
Last Year
- Release event: 2
- Watch event: 1
- Public event: 1
- Push event: 8
- Pull request event: 2
- Fork event: 1
- Create event: 3
Issues and Pull Requests
Last synced: 9 months ago
All Time
- Total issues: 0
- Total pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: less than a minute
- Total issue authors: 0
- Total pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: less than a minute
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
- TomMonks (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- jupyterlab 4.3.5.*
- jupyterlab-plotly-extension 1.0.0.*
- jupyterlab-spellchecker 0.8.4.*
- numpy 2.2.3.*
- pandas 2.2.3.*
- pip 25.0.*
- python 3.11.*