Instructions to use josephmayo/ZAYA1-8B-Coder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use josephmayo/ZAYA1-8B-Coder with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="josephmayo/ZAYA1-8B-Coder") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("josephmayo/ZAYA1-8B-Coder", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use josephmayo/ZAYA1-8B-Coder with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "josephmayo/ZAYA1-8B-Coder" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "josephmayo/ZAYA1-8B-Coder", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/josephmayo/ZAYA1-8B-Coder
- SGLang
How to use josephmayo/ZAYA1-8B-Coder 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 "josephmayo/ZAYA1-8B-Coder" \ --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": "josephmayo/ZAYA1-8B-Coder", "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 "josephmayo/ZAYA1-8B-Coder" \ --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": "josephmayo/ZAYA1-8B-Coder", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use josephmayo/ZAYA1-8B-Coder with Docker Model Runner:
docker model run hf.co/josephmayo/ZAYA1-8B-Coder
File size: 3,868 Bytes
2f128c2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | idx,prompt,base_score,lora_score,delta
1,Write a Python function that sorts a list of integers using quicksort.,3,2,-1
2,Implement a binary search algorithm in Python.,1,3,2
3,Write a Python function to compute the factorial of n using recursion.,3,7,4
4,Write a Python function to compute the nth Fibonacci number iteratively.,3,8,5
5,Write a Python function to check if a number is prime.,3,4,1
6,Implement the Sieve of Eratosthenes to find all primes up to n.,3,4,1
7,Write a Python function to find the greatest common divisor of two numbers.,3,8,5
8,Write a Python function to find the least common multiple of two numbers.,3,6,3
9,"Write a Python class for a simple stack with push, pop, and peek methods.",0,4,4
10,Write a Python class for a queue with enqueue and dequeue methods.,3,6,3
11,Implement a singly linked list in Python with insert and delete methods.,3,2,-1
12,Implement an LRU cache in Python using collections.OrderedDict.,3,2,-1
13,Write a Python class for a binary search tree with insert and search methods.,1,2,1
14,Implement a min-heap in Python.,1,5,4
15,Generate a Python function to check if a string is a palindrome.,3,8,5
16,Write a Python function to reverse a string without using slicing.,3,5,2
17,Write a Python function to count the frequency of each character in a string.,1,6,5
18,Write a Python function to find the longest common subsequence of two strings.,3,3,0
19,Write a Python function to check if two strings are anagrams.,3,8,5
20,Implement a function to perform basic string compression.,3,8,5
21,Write a Python function to merge two sorted lists into one sorted list.,3,2,-1
22,Write a Python function to find the maximum subarray sum using Kadane's algorithm.,1,5,4
23,Write a Python function to rotate a list by k positions.,3,4,1
24,Write a Python function to find the median of two sorted arrays.,3,2,-1
25,Write a Python function to remove duplicates from a sorted list in-place.,3,5,2
26,Write a Python function to find the intersection of two lists.,3,9,6
27,Write a Python function to perform depth-first search on a graph.,3,6,3
28,Write a Python function to perform breadth-first search on a graph.,3,2,-1
29,Write a Python function to check if a binary tree is balanced.,3,8,5
30,Write a Python function to find the diameter of a binary tree.,3,5,2
31,Write a Python function to solve the 0/1 knapsack problem.,3,3,0
32,Write a Python function to count the number of ways to climb n stairs.,3,5,2
33,Write a Python function to find the longest increasing subsequence.,0,4,4
34,Write a Python function to find the minimum edit distance between two strings.,3,5,2
35,Write a Python function to calculate x raised to n efficiently.,3,4,1
36,Write a Python function to find the integer square root using binary search.,1,5,4
37,Write a Python function to convert a Roman numeral to an integer.,0,4,4
38,Write a Python function to generate Pascal's triangle up to n rows.,3,3,0
39,Write a Python function to read a CSV file and return a list of dictionaries.,3,2,-1
40,Write a Python function to write a list of dictionaries to a JSON file.,3,2,-1
41,Write a Python function to count the number of lines in a text file.,3,6,3
42,Implement merge sort in Python.,0,5,5
43,Implement heap sort in Python.,0,2,2
44,Write a Python function to find the kth largest element in an unsorted list.,3,7,4
45,Write a Python decorator that measures the execution time of a function.,1,5,4
46,Write a Python function to flatten a nested list of arbitrary depth.,3,5,2
47,Write a Python function to deep clone a dictionary.,3,7,4
48,Write a Python class that implements a simple token bucket rate limiter.,3,6,3
49,Write a Python context manager for creating and cleaning up a temporary file.,0,5,5
50,Write a Python function to validate whether a Sudoku board is valid.,3,4,1
|