Instructions to use cgrumbach/BitcoinPaper with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cgrumbach/BitcoinPaper with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="cgrumbach/BitcoinPaper")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("cgrumbach/BitcoinPaper") model = AutoModelForCausalLM.from_pretrained("cgrumbach/BitcoinPaper", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use cgrumbach/BitcoinPaper with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cgrumbach/BitcoinPaper" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cgrumbach/BitcoinPaper", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/cgrumbach/BitcoinPaper
- SGLang
How to use cgrumbach/BitcoinPaper with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "cgrumbach/BitcoinPaper" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cgrumbach/BitcoinPaper", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "cgrumbach/BitcoinPaper" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cgrumbach/BitcoinPaper", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use cgrumbach/BitcoinPaper with Docker Model Runner:
docker model run hf.co/cgrumbach/BitcoinPaper
Download plots/carboncomparison/table/table.html from cgrumbach/BitcoinPaper: direct link, hf CLI and curl.
- Browser
- Download file 10.1 kB
-
https://huggingface.co/cgrumbach/BitcoinPaper/resolve/main/plots/carboncomparison/table/table.html
- Command line
-
hf download hf://cgrumbach/BitcoinPaper/plots/carboncomparison/table/table.html
-
curl -L -o table.html https://huggingface.co/cgrumbach/BitcoinPaper/resolve/main/plots/carboncomparison/table/table.html
10.1 kB
| <table> | |
| <tbody> | |
| <tr> | |
| <td> | |
| <p><strong><span>Author</span></strong></p> | |
| </td> | |
| <td> | |
| <p><strong><span>Publication date</span></strong></p> | |
| </td> | |
| <td> | |
| <p><strong><span>Title</span></strong></p> | |
| </td> | |
| <td> | |
| <p><strong><span>Estimate (TWh)</span></strong></p> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td> | |
| <p><span>Digiconomist</span></p> | |
| </td> | |
| <td> | |
| <p><span>Live estimate</span></p> | |
| </td> | |
| <td> | |
| <p><a href="https://digiconomist.net/bitcoin-energy-consumption" | |
| rel="noopener noreferrer nofollow"><span>Bitcoin Energy Consumption | |
| Index</span></a></p> | |
| </td> | |
| <td> | |
| <p class="text-right">{insert API}</p> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td> | |
| <p><span>CoinMetrics</span></p> | |
| </td> | |
| <td> | |
| <p><span>June 2023</span></p> | |
| </td> | |
| <td> | |
| <p><a | |
| href="https://coinmetrics.io/special-insights/bitcoin-nonce-analysis/#:~:text=The%20Signal%20%26%20The%20Nonce%20This%20paper%20introduces,patterns%20and%20incorporating%20data%20sourced%20from%20real-world%20ASICs." | |
| rel="noopener noreferrer nofollow"><span>The Signal & The | |
| Nonce</span></a></p> | |
| </td> | |
| <td> | |
| <p class="text-right"><span>117.4</span></p> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td> | |
| <p><span>De Vries, A., Gallersdorfer, U., Klaaßen, L. and | |
| Stoll, C.</span></p> | |
| </td> | |
| <td> | |
| <p><span>February 2022</span></p> | |
| </td> | |
| <td> | |
| <p><a href="https://www.sciencedirect.com/science/article/pii/S2542435122000861" | |
| rel="noopener noreferrer nofollow"><span>Revisiting Bitcoin's carbon | |
| footprint</span></a></p> | |
| </td> | |
| <td> | |
| <p class="text-right"><span>117.3</span></p> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td> | |
| <p><span>CoinShares</span></p> | |
| </td> | |
| <td> | |
| <p><span>January 2022</span></p> | |
| </td> | |
| <td> | |
| <p><a href="https://coinshares.com/research/bitcoin-mining-network-2022" | |
| rel="noopener noreferrer nofollow"><span>The Bitcoin Mining | |
| Network</span></a></p> | |
| </td> | |
| <td> | |
| <p class="text-right"><span>89.0</span></p> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td> | |
| <p><span>Sandner, P., Lichti, C., Richter, R., Heidt, C. and | |
| Schaub, B.</span></p> | |
| </td> | |
| <td> | |
| <p><span>August 2021</span></p> | |
| </td> | |
| <td> | |
| <p><a | |
| href="https://philippsandner.medium.com/study-the-carbon-emissions-of-bitcoin-from-an-investor-perspective-4c90707474b8" | |
| rel="noopener noreferrer nofollow"><span>The Carbon Emissions of | |
| Bitcoin From an Investor Perspective</span></a></p> | |
| </td> | |
| <td> | |
| <p class="text-right"><span>90.9</span></p> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td> | |
| <p><span>Köhler, S. and Pizzol, M.</span></p> | |
| </td> | |
| <td> | |
| <p><span>November 2019</span></p> | |
| </td> | |
| <td> | |
| <p><a href="https://pubs.acs.org/doi/10.1021/acs.est.9b05687" | |
| rel="noopener noreferrer nofollow"><span>Life Cycle Assessment of | |
| Bitcoin Mining</span></a></p> | |
| </td> | |
| <td> | |
| <p class="text-right"><span>31.3</span></p> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td> | |
| <p><span>Stoll, C., Klaaßen, L. and Gallersdorfer, U.</span> | |
| </p> | |
| </td> | |
| <td> | |
| <p><span>June 2019</span></p> | |
| </td> | |
| <td> | |
| <p><a href="https://www.cell.com/action/showPdf?pii=S2542-4351%2819%2930255-7" | |
| target="_blank" rel="noopener noreferrer nofollow"><span>The Carbon | |
| Footprint of Bitcoin</span></a></p> | |
| </td> | |
| <td> | |
| <p class="text-right"><span>48.5</span></p> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td> | |
| <p><span style="font-size: 16px">Zade, M., Myklebost, J., Tzscheutschler, P. and | |
| Wagner, U.</span></p> | |
| </td> | |
| <td> | |
| <p><span>March 2019</span></p> | |
| </td> | |
| <td> | |
| <p><a href="https://www.frontiersin.org/articles/10.3389/fenrg.2019.00021/full" | |
| target="_blank" rel="noopener noreferrer nofollow"><span>Is Bitcoin | |
| the Only Problem? A Scenario Model for the Power Demand of Blockchains</span></a></p> | |
| </td> | |
| <td> | |
| <p class="text-right"><span>33.7</span></p> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td> | |
| <p><span>Krause, M.J. and Tolaymat, T.</span></p> | |
| </td> | |
| <td> | |
| <p><span>November 2018</span></p> | |
| </td> | |
| <td> | |
| <p><a href="https://www.nature.com/articles/s41893-018-0152-7.pdf" target="_blank" | |
| rel="noopener noreferrer nofollow"><span>Quantification of energy and | |
| carbon costs for mining cryptocurrencies</span></a></p> | |
| </td> | |
| <td> | |
| <p class="text-right"><span>30.1</span></p> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td> | |
| <p><span>McCook, H.</span></p> | |
| </td> | |
| <td> | |
| <p><span>August 2018</span></p> | |
| </td> | |
| <td> | |
| <p><a | |
| href="https://www.academia.edu/37178295/The_Cost_and_Sustainability_of_Bitcoin_August_2018_" | |
| target="_blank" rel="noopener noreferrer nofollow"><span>The cost | |
| & sustainability of Bitcoin</span></a></p> | |
| </td> | |
| <td> | |
| <p class="text-right"><span>105.0</span></p> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td> | |
| <p><span>De Vries, A.</span></p> | |
| </td> | |
| <td> | |
| <p><span>May 2018</span></p> | |
| </td> | |
| <td> | |
| <p><a | |
| href="https://www.researchgate.net/publication/325188032_Bitcoin's_Growing_Energy_Problem" | |
| target="_blank" rel="noopener noreferrer nofollow"><span>Bitcoin's | |
| Growing Energy Problem</span></a></p> | |
| </td> | |
| <td> | |
| <p class="text-right"><span>22.4 to 67.2</span></p> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td> | |
| <p><span>Vranken, H.</span></p> | |
| </td> | |
| <td> | |
| <p><span>October 2017</span></p> | |
| </td> | |
| <td> | |
| <p><a href="https://www.sciencedirect.com/science/article/pii/S1877343517300015" | |
| target="_blank" rel="noopener noreferrer nofollow"><span | |
| >Sustainability of bitcoin and blockchains</span></a></p> | |
| </td> | |
| <td> | |
| <p class="text-right"><span>0.9 to 4.4</span></p> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td> | |
| <p><span>Bevand, M.</span></p> | |
| </td> | |
| <td> | |
| <p><span>February 2017</span></p> | |
| </td> | |
| <td> | |
| <p><a href="http://blog.zorinaq.com/bitcoin-electricity-consumption/#fnref:refD:1" | |
| target="_blank" rel="noopener noreferrer nofollow"><span>Electricity | |
| consumption of Bitcoin: a market-based and technical analysis</span></a></p> | |
| </td> | |
| <td> | |
| <p class="text-right"><span>4.1 to 4.7</span></p> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td> | |
| <p><span>Hayes, A.S.</span></p> | |
| </td> | |
| <td> | |
| <p><span>March 2015</span></p> | |
| </td> | |
| <td> | |
| <p><a href="http://www.economicpolicyresearch.org/econ/2015/NSSR_WP_052015.pdf" | |
| target="_blank" rel="noopener noreferrer nofollow"><span>A Cost | |
| Production Model for Bitcoin</span></a></p> | |
| </td> | |
| <td> | |
| <p><span> </span></p> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td> | |
| <p><span>O'Dwyer, K.L. and Malone, D.</span></p> | |
| </td> | |
| <td> | |
| <p><span>September 2014</span></p> | |
| </td> | |
| <td> | |
| <p><a href="http://karlodwyer.com/publications/pdf/bitcoin_KJOD_2014.pdf" | |
| target="_blank" rel="noopener noreferrer nofollow"><span>Bitcoin | |
| Mining and its Energy Footprint</span></a></p> | |
| </td> | |
| <td> | |
| <p class="text-right"><span>0.9 to 87.6</span></p> | |
| </td> | |
| </tr> | |
| </tbody> | |
| </table> |