Text Generation
Transformers
Safetensors
English
llama
codepy
ollama
llama-cpp
trl
deep-think
coder
conversational
text-generation-inference
Instructions to use prithivMLmods/Codepy-Deepthink-3B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use prithivMLmods/Codepy-Deepthink-3B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="prithivMLmods/Codepy-Deepthink-3B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("prithivMLmods/Codepy-Deepthink-3B") model = AutoModelForCausalLM.from_pretrained("prithivMLmods/Codepy-Deepthink-3B", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use prithivMLmods/Codepy-Deepthink-3B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "prithivMLmods/Codepy-Deepthink-3B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prithivMLmods/Codepy-Deepthink-3B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/prithivMLmods/Codepy-Deepthink-3B
- SGLang
How to use prithivMLmods/Codepy-Deepthink-3B 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 "prithivMLmods/Codepy-Deepthink-3B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prithivMLmods/Codepy-Deepthink-3B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "prithivMLmods/Codepy-Deepthink-3B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prithivMLmods/Codepy-Deepthink-3B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use prithivMLmods/Codepy-Deepthink-3B with Docker Model Runner:
docker model run hf.co/prithivMLmods/Codepy-Deepthink-3B
Commit History
-
Adding `safetensors` variant of this model
Verified signatureThis is an automated PR created with https://huggingface.co/spaces/safetensors/convert This new file is equivalent to `pytorch_model.bin` but safe in the sense that no arbitrary code can be put into it. These files also happen to load much faster than their pytorch counterpart: https://colab.research.google.com/github/huggingface/notebooks/blob/main/safetensors_doc/en/speed.ipynb The widgets on your model page will run using this model even if this is not merged making sure the file actually works. If you find any issues: please report here: https://huggingface.co/spaces/safetensors/convert/discussions Feel free to ignore this PR.c442844
-
Update README.md
Verified signatured77c8be -
Update README.md
Verified signature8c16554 -
Update README.md
Verified signaturea29eca4 -
Update README.md
Verified signature553c034 -
Update README.md
Verified signature49e382e -
Update README.md
Verified signaturec979521 -
Update README.md
Verified signature112c615 -
Update README.md
Verified signatureba1f60d -
Update README.md
Verified signature5ea1d73 -
Update README.md
Verified signature0aa1128 -
Update README.md
Verified signature7587838 -
Update README.md
Verified signature69046d4 -
Update README.md
Verified signaturedc7c865 -
Update README.md
Verified signaturec3649af -
Update README.md
Verified signature16ec3a6 -
Update README.md
Verified signaturefde6923 -
Update README.md
Verified signaturea8b9e81 -
Update README.md
Verified signaturecf6dc85 -
Update README.md
Verified signature8c6cc0e -
Update README.md
Verified signature95c977e -
Update README.md
Verified signatureb06dc6b -
Update README.md
Verified signature4e98b08 -
Update README.md
Verified signature3839126 -
Update README.md
Verified signature8821eb2 -
Update README.md
Verified signature33799af -
Update README.md
Verified signature0e5b627 -
Update README.md
Verified signature9ece1b2 -
Update README.md
Verified signature7513e80 -
Update README.md
Verified signaturea20b2b9 -
Update README.md
Verified signature93afa45 -
Update README.md
Verified signaturecba8512 -
Update README.md
Verified signature017c3da -
Update README.md
Verified signaturec70e6d3 -
Update README.md
Verified signature3f0b2ed -
Update README.md
Verified signature74249e8 -
Update README.md
Verified signature8410a75 -
Update README.md
Verified signature7abb75e -
Update README.md
Verified signature9e3bb69 -
Update README.md
Verified signaturef05703a -
Update README.md
Verified signature71f0fab -
Upload 8 files
Verified signaturea56637d -
initial commit
Verified signature6a70818