# How to create this collection with non-default parameters?

**URL:** <https://forum.weaviate.io/t/how-to-create-this-collection-with-non-default-parameters/1776>\
**Category:** Support\
**Created:** [March 20, 2024, 9:13pm UTC](https://forum.weaviate.io/t/how-to-create-this-collection-with-non-default-parameters/1776 "2024-03-20T21:13:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![moruga123](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/moruga123/32/598_2.png) [@moruga123](https://forum.weaviate.io/u/moruga123)\
**Post date:** [March 20, 2024, 9:13pm UTC](https://forum.weaviate.io/t/how-to-create-this-collection-with-non-default-parameters/1776/1 "2024-03-20T21:13:46Z")

</div>

### Description

How do I configure a collection to use a transformers vectorizer (specifically, for a bi-encoder setup)? I used the Configurator to create a docker-compose.yml file with separate encoders for Queries and Passages, which is standard for Dense Passage Retrievers. Thus far I haven’t found any example for defining a transformers vectorizer, and haven’t been able to find out what the options are from. All examples I’ve seen just use wc.Configure.Vectorizer.text2vec\_openai().

Relevant pieces of the docker-compose are:

```auto
    environment:
      TRANSFORMERS_PASSAGE_INFERENCE_API: 'http://t2v-transformers-passage:8080'
      TRANSFORMERS_QUERY_INFERENCE_API: 'http://t2v-transformers-query:8080'
      ...
      DEFAULT_VECTORIZER_MODULE: 'text2vec-transformers'
      ENABLE_MODULES: 'text2vec-transformers,reranker-transformers'
  t2v-transformers-passage:
    image: cr.weaviate.io/semitechnologies/transformers-inference:facebook-dpr-ctx_encoder-single-nq-base
      ...
  t2v-transformers-query:
    image: cr.weaviate.io/semitechnologies/transformers-inference:facebook-dpr-question_encoder-single-nq-base
      ...

```

```auto
import weaviate
import weaviate.classes as wvc

client = weaviate.connect_to_custom(
    http_host="localhost",
    http_port="8080",
    http_secure=False,
    grpc_host="localhost",
    grpc_port="50051",
    grpc_secure=False,
)

try:
    collection_spacecom = client.collections.create(
        name="mycollection",
        vectorizer_config=wvc.config.Configure.Vectorizer.?????
    )

finally:
    client.close() # Ensure the connection is closed

```

### Server Setup Information

- Weaviate Server Version: Docker image: [cr.weaviate.io/semitechnologies/weaviate:1.24.2](http://cr.weaviate.io/semitechnologies/weaviate:1.24.2)
- Deployment Method: Docker compose
- Multi Node? Number of Running Nodes:
- Client Language and Version: Python client v4

---

<div class="post-metadata">

**Author:** ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)\
**Post date:** [March 21, 2024, 12:28pm UTC](https://forum.weaviate.io/t/how-to-create-this-collection-with-non-default-parameters/1776/2 "2024-03-21T12:28:25Z")

</div>

Hi @moruga123 !! Welcome to our community 🤗

A great tip is using a code editor that has autocompletion.

For example, this is what happens as soon as I press the . in `wc.Configure.Vectorizer.`

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/weaviate/original/2X/3/32682a718b6ce0b9abd6748d343359788ace8149.png)

once you select `text2vec_transformers` you can also inspect all the available options by leaving your mouse on that method:

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/weaviate/original/2X/1/1667303e567daa875977d0fe108c620279ab6bb1.png)

Let me know if this helps!

Thanks!
