Instructions to use prithivMLmods/Llama-8B-Distill-CoT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use prithivMLmods/Llama-8B-Distill-CoT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="prithivMLmods/Llama-8B-Distill-CoT") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("prithivMLmods/Llama-8B-Distill-CoT") model = AutoModelForCausalLM.from_pretrained("prithivMLmods/Llama-8B-Distill-CoT") 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use prithivMLmods/Llama-8B-Distill-CoT with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "prithivMLmods/Llama-8B-Distill-CoT" # 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/Llama-8B-Distill-CoT", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/prithivMLmods/Llama-8B-Distill-CoT
- SGLang
How to use prithivMLmods/Llama-8B-Distill-CoT 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/Llama-8B-Distill-CoT" \ --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/Llama-8B-Distill-CoT", "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/Llama-8B-Distill-CoT" \ --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/Llama-8B-Distill-CoT", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use prithivMLmods/Llama-8B-Distill-CoT with Docker Model Runner:
docker model run hf.co/prithivMLmods/Llama-8B-Distill-CoT
Llama-8B-Distill-CoT
Llama-8B-Distill-CoT is based on the Llama [ KT ] model, distilled by DeepSeek-R1-Distill-Llama-8B. It has been fine-tuned on the long chain-of-thought reasoning model and specialized datasets, focusing on chain-of-thought (CoT) reasoning for problem-solving. This model is optimized for tasks requiring logical reasoning, detailed explanations, and multi-step problem-solving, making it ideal for applications such as instruction-following, text generation, and complex reasoning tasks.
Use with transformers
Starting with transformers >= 4.43.0 onward, you can run conversational inference using the Transformers pipeline abstraction or by leveraging the Auto classes with the generate() function.
Make sure to update your transformers installation via pip install --upgrade transformers.
import transformers
import torch
model_id = "prithivMLmods/Llama-8B-Distill-CoT"
pipeline = transformers.pipeline(
"text-generation",
model=model_id,
model_kwargs={"torch_dtype": torch.bfloat16},
device_map="auto",
)
messages = [
{"role": "system", "content": "You are a pirate chatbot who always responds in pirate speak!"},
{"role": "user", "content": "Who are you?"},
]
outputs = pipeline(
messages,
max_new_tokens=256,
)
print(outputs[0]["generated_text"][-1])
Intended Use:
- Instruction-Following: The model is designed to handle detailed instructions, making it ideal for virtual assistants, automation tools, and educational platforms.
- Problem-Solving: Its fine-tuning on chain-of-thought (CoT) reasoning allows it to tackle multi-step problem-solving in domains such as mathematics, logic, and programming.
- Text Generation: Capable of generating coherent and contextually relevant content, it is suitable for creative writing, documentation, and report generation.
- Education and Training: Provides step-by-step explanations and logical reasoning, making it a useful tool for teaching and learning.
- Research and Analysis: Supports researchers and professionals by generating detailed analyses and structured arguments for complex topics.
- Programming Assistance: Helps in generating, debugging, and explaining code, as well as creating structured outputs like JSON or XML.
Limitations:
- Resource Intensive: Requires high computational resources to run efficiently, which may limit accessibility for small-scale deployments.
- Hallucination Risk: May generate incorrect or misleading information, especially when handling ambiguous or poorly framed prompts.
- Domain-Specific Gaps: While fine-tuned for reasoning, it may not perform well in specialized domains outside its training data.
- Bias in Training Data: The model's responses can reflect biases present in the datasets it was trained on, potentially leading to biased or inappropriate outputs.
- Dependence on Input Quality: Performance heavily depends on clear, structured inputs. Ambiguous or vague queries can result in suboptimal outputs.
- Limited Real-Time Context: The model cannot access real-time information or updates beyond its training data, potentially affecting its relevance for time-sensitive queries.
- Scalability for Long-Context: While capable of multi-step reasoning, its ability to handle extremely long or complex contexts may be limited compared to larger, more specialized models.
- Downloads last month
- 9
Model tree for prithivMLmods/Llama-8B-Distill-CoT
Base model
deepseek-ai/DeepSeek-R1-Distill-Llama-8B