You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
petals/tests
Alexander Borzunov de2475f31c
Make client compatible with transformers' GenerationMixin (#464)
This PR drops custom generation codes and introduces compatibility with `transformers.GenerationMixin` instead. This includes support for more sampling options (`top_p`, `top_k`, `repetition_penalty` requested in #460) and beam search - all that is now identical to running model with transformers locally.

Most features (excluding beam search and other rarely used stuff) are also compatible with resuming existing sessions.

### Breaking changes

If `.generate()` or forward passes are being run inside an `.inference_session()` context, they now use the opened session by default. So, these snippets are now equivalent:

```python
# Using default session
with model.inference_session(max_length=100):
    output_ids = model.generate(input_ids, max_new_tokens=3)

# Explicitly specifying a session
with model.inference_session(max_length=100) as sess:
    output_ids = model.generate(input_ids, max_new_tokens=3, session=sess)
```

Earlier, the 1st snippet was creating a new session, which is not what most people expected (= such code was most likely to introduce a bug, which is now fixed).
9 months ago
..
bootstrap.id Test Llama, rebalancing, throughput eval, and all CLI scripts (#452) 10 months ago
conftest.py Fix logging: do not duplicate lines, enable colors in Colab (#156) 1 year ago
server2.id Test Llama, rebalancing, throughput eval, and all CLI scripts (#452) 10 months ago
test_aux_functions.py Add customizable input tensors (#445) 9 months ago
test_block_exact_match.py Prioritize short inference, unmerge pools for long inference (#458) 9 months ago
test_chained_calls.py Test Llama, rebalancing, throughput eval, and all CLI scripts (#452) 10 months ago
test_dtype.py Add LLaMA support (#323) 11 months ago
test_full_model.py Make client compatible with transformers' GenerationMixin (#464) 9 months ago
test_peft.py Support peft LoRA adapters (#335) 10 months ago
test_priority_pool.py Fix issues related to `petals` as a module (#159) 1 year ago
test_remote_sequential.py Add `blocked_servers` argument (#462) 9 months ago
test_sequence_manager.py Test Llama, rebalancing, throughput eval, and all CLI scripts (#452) 10 months ago
test_server_stats.py Test Llama, rebalancing, throughput eval, and all CLI scripts (#452) 10 months ago
test_tensor_parallel.py Test Llama, rebalancing, throughput eval, and all CLI scripts (#452) 10 months ago
test_utils.py Support peft LoRA adapters (#335) 10 months ago