# # Fast-Inference with Ctranslate2
Speedup inference while reducing memory by 2x-4x using int8 inference in C++ on CPU or GPU.

quantized version of [HuggingFaceH4/starchat-alpha](https://huggingface.co/HuggingFaceH4/starchat-alpha)
```bash
pip install hf-hub-ctranslate2>=2.0.8 ctranslate2>=3.14.0
```
Converted on 2023-06-02 using
```
ct2-transformers-converter --model HuggingFaceH4/starchat-alpha --output_dir /home/michael/tmp-ct2fast-starchat-alpha --force --copy_files merges.txt all_results.json training_args.bin tokenizer.json README.md dialogue_template.json tokenizer_config.json eval_results.json vocab.json TRAINER_README.md train_results.json generation_config.json trainer_state.json special_tokens_map.json added_tokens.json requirements.txt .gitattributes --quantization int8_float16 --trust_remote_code
```

Checkpoint compatible to [ctranslate2>=3.14.0](https://github.com/OpenNMT/CTranslate2)
and [hf-hub-ctranslate2>=2.0.8](https://github.com/michaelfeil/hf-hub-ctranslate2)
- `compute_type=int8_float16` for `device="cuda"`
- `compute_type=int8`  for `device="cpu"`

```python
from hf_hub_ctranslate2 import TranslatorCT2fromHfHub, GeneratorCT2fromHfHub
from transformers import AutoTokenizer

model_name = "michaelfeil/ct2fast-starchat-alpha"
# use either TranslatorCT2fromHfHub or GeneratorCT2fromHfHub here, depending on model.
model = GeneratorCT2fromHfHub(
        # load in int8 on CUDA
        model_name_or_path=model_name,
        device="cuda",
        compute_type="int8_float16",
        # tokenizer=AutoTokenizer.from_pretrained("HuggingFaceH4/starchat-alpha")
)
outputs = model.generate(
    text=["def fibonnaci(", "User: How are you doing? Bot:"],
    max_length=64,
    include_prompt_in_result=False
)
print(outputs)
```

# Licence and other remarks:
This is just a quantized version. Licence conditions are intended to be idential to original huggingface repo.

# Original description
    

# Model Card for StarChat Alpha

<!-- Provide a quick summary of what the model is/does. -->

StarChat is a series of language models that are fine-tuned from StarCoder to act as helpful coding assistants. StarChat Alpha is the first of these models, and as an alpha release is only intended for educational or research purpopses. In particular, the model has not been aligned to human preferences with techniques like RLHF, so may generate problematic content (especially when prompted to do so).

## Model Details

### Model Description

<!-- Provide a longer summary of what this model is. -->

- **Model type:** A 16B parameter GPT-like model fine-tuned on a blend of the [`oasst1`](https://huggingface.co/datasets/OpenAssistant/oasst1) and [`databricks-dolly-15k`](https://huggingface.co/datasets/databricks/databricks-dolly-15k) datasets.
- **Language(s) (NLP):** English
- **License:** BigCode Open RAIL-M v1
- **Finetuned from model:** [bigcode/starcoderbase](https://huggingface.co/bigcode/starcoderbase)

### Model Sources [optional]

<!-- Provide the basic links for the model. -->

- **Repository:** https://github.com/bigcode-project/starcoder
- **Demo:** https://huggingface.co/spaces/HuggingFaceH4/starchat-playground

## Uses

<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->

StarChat Alpha is intended for educational and/or research purposes and in that respect can be used to probe the programming capabilities of open-source language models.

## Bias, Risks, and Limitations

<!-- This section is meant to convey both technical and sociotechnical limitations. -->

StarChat Alpha has not been aligned to human preferences with techniques like RLHF or deployed with in-the-loop filtering of responses like ChatGPT, so the model can produce problematic outputs (especially when prompted to do so). 
Models trained primarily on code data will also have a more skewed demographic bias commensurate with the demographics of the GitHub community, for more on this see the [StarCoder dataset](https://huggingface.co/datasets/bigcode/starcoderdata) which is derived from The Stack.


Since the base model was pretrained on a large corpus of code, it may produce code snippets that are syntactically valid but semantically incorrect. 
For example, it may produce code that does not compile or that produces incorrect results.  
It may also produce code that is vulnerable to security exploits.  
We have observed the model also has a tendency to produce false URLs which should be carefully inspected before clicking.

StarChat Alpha was fine-tuned from the base model [StarCoder Base](https://huggingface.co/bigcode/starcoderbase), please refer to its model card's [Limitations Section](https://huggingface.co/bigcode/starcoderbase#limitations) for relevant information. 
In particular, the model was evaluated on some categories of gender biases, propensity for toxicity, and risk of suggesting code completions with known security flaws; these evaluations are reported in its [technical report](https://drive.google.com/file/d/1cN-b9GnWtHzQRoE7M7gAEyivY0kl4BYs/view).

## How to Get Started with the Model

Use the code below to get started with the model.

```python
from transformers import pipeline

pipe = pipeline("text-generation", model="HuggingFaceH4/starchat-alpha")
# Inputs use chat tokens 
inputs = "<|system|>\n<|end|>\n<|user|>How can I sort a list in Python?<|end|>\n<|assistant|>"
outputs = pipe(inputs)
```



## Citation [optional]

<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->

**BibTeX:**

```
@article{Tunstall2023starchat-alpha,
  author = {Tunstall, Lewis and Lambert, Nathan and Rajani, Nazneen and Beeching, Edward and Le Scao, Teven and von Werra, Leandro and Han, Sheon and Schmid, Philipp and Rush, Alexander},
  title = {Creating a Coding Assistant with StarCoder},
  journal = {Hugging Face Blog},
  year = {2023},
  note = {https://huggingface.co/blog/starchat},
}
```
{"language": ["en"], "license": "bigcode-openrail-m", "library_name": "transformers", "tags": ["ctranslate2", "int8", "float16", "code"], "datasets": ["OpenAssistant/oasst1", "databricks/databricks-dolly-15k"]}
transformers ctranslate2 int8 float16 code en dataset:OpenAssistant/oasst1 dataset:databricks/databricks-dolly-15k license:bigcode-openrail-m endpoints_compatible region:us
TAGS
#transformers #ctranslate2 #int8 #float16 #code #en #dataset-OpenAssistant/oasst1 #dataset-databricks/databricks-dolly-15k #license-bigcode-openrail-m #endpoints_compatible #region-us 

# # Fast-Inference with Ctranslate2
Speedup inference while reducing memory by 2x-4x using int8 inference in C++ on CPU or GPU.

quantized version of HuggingFaceH4/starchat-alpha

Converted on 2023-06-02 using


Checkpoint compatible to ctranslate2>=3.14.0
and hf-hub-ctranslate2>=2.0.8
- 'compute_type=int8_float16' for 'device="cuda"'
- 'compute_type=int8'  for 'device="cpu"'



# Licence and other remarks:
This is just a quantized version. Licence conditions are intended to be idential to original huggingface repo.

# Original description
    

# Model Card for StarChat Alpha



StarChat is a series of language models that are fine-tuned from StarCoder to act as helpful coding assistants. StarChat Alpha is the first of these models, and as an alpha release is only intended for educational or research purpopses. In particular, the model has not been aligned to human preferences with techniques like RLHF, so may generate problematic content (especially when prompted to do so).

## Model Details

### Model Description



- Model type: A 16B parameter GPT-like model fine-tuned on a blend of the 'oasst1' and 'databricks-dolly-15k' datasets.
- Language(s) (NLP): English
- License: BigCode Open RAIL-M v1
- Finetuned from model: bigcode/starcoderbase

### Model Sources [optional]



- Repository: URL
- Demo: URL

## Uses



StarChat Alpha is intended for educational and/or research purposes and in that respect can be used to probe the programming capabilities of open-source language models.

## Bias, Risks, and Limitations



StarChat Alpha has not been aligned to human preferences with techniques like RLHF or deployed with in-the-loop filtering of responses like ChatGPT, so the model can produce problematic outputs (especially when prompted to do so). 
Models trained primarily on code data will also have a more skewed demographic bias commensurate with the demographics of the GitHub community, for more on this see the StarCoder dataset which is derived from The Stack.


Since the base model was pretrained on a large corpus of code, it may produce code snippets that are syntactically valid but semantically incorrect. 
For example, it may produce code that does not compile or that produces incorrect results.  
It may also produce code that is vulnerable to security exploits.  
We have observed the model also has a tendency to produce false URLs which should be carefully inspected before clicking.

StarChat Alpha was fine-tuned from the base model StarCoder Base, please refer to its model card's Limitations Section for relevant information. 
In particular, the model was evaluated on some categories of gender biases, propensity for toxicity, and risk of suggesting code completions with known security flaws; these evaluations are reported in its technical report.

## How to Get Started with the Model

Use the code below to get started with the model.





[optional]



BibTeX:


# # Fast-Inference with Ctranslate2
Speedup inference while reducing memory by 2x-4x using int8 inference in C++ on CPU or GPU.

quantized version of HuggingFaceH4/starchat-alpha

Converted on 2023-06-02 using


Checkpoint compatible to ctranslate2>=3.14.0
and hf-hub-ctranslate2>=2.0.8
- 'compute_type=int8_float16' for 'device="cuda"'
- 'compute_type=int8'  for 'device="cpu"' # Licence and other remarks:
This is just a quantized version. Licence conditions are intended to be idential to original huggingface repo. # Original description # Model Card for StarChat Alpha



StarChat is a series of language models that are fine-tuned from StarCoder to act as helpful coding assistants. StarChat Alpha is the first of these models, and as an alpha release is only intended for educational or research purpopses. In particular, the model has not been aligned to human preferences with techniques like RLHF, so may generate problematic content (especially when prompted to do so). ## Model Details ### Model Description



- Model type: A 16B parameter GPT-like model fine-tuned on a blend of the 'oasst1' and 'databricks-dolly-15k' datasets.
- Language(s) (NLP): English
- License: BigCode Open RAIL-M v1
- Finetuned from model: bigcode/starcoderbase ### Model Sources [optional]



- Repository: URL
- Demo: URL ## Uses



StarChat Alpha is intended for educational and/or research purposes and in that respect can be used to probe the programming capabilities of open-source language models. ## Bias, Risks, and Limitations



StarChat Alpha has not been aligned to human preferences with techniques like RLHF or deployed with in-the-loop filtering of responses like ChatGPT, so the model can produce problematic outputs (especially when prompted to do so). 
Models trained primarily on code data will also have a more skewed demographic bias commensurate with the demographics of the GitHub community, for more on this see the StarCoder dataset which is derived from The Stack.


Since the base model was pretrained on a large corpus of code, it may produce code snippets that are syntactically valid but semantically incorrect. 
For example, it may produce code that does not compile or that produces incorrect results.  
It may also produce code that is vulnerable to security exploits.  
We have observed the model also has a tendency to produce false URLs which should be carefully inspected before clicking.

StarChat Alpha was fine-tuned from the base model StarCoder Base, please refer to its model card's Limitations Section for relevant information. 
In particular, the model was evaluated on some categories of gender biases, propensity for toxicity, and risk of suggesting code completions with known security flaws; these evaluations are reported in its technical report. ## How to Get Started with the Model

Use the code below to get started with the model.





[optional]



BibTeX:
TAGS
#transformers #ctranslate2 #int8 #float16 #code #en #dataset-OpenAssistant/oasst1 #dataset-databricks/databricks-dolly-15k #license-bigcode-openrail-m #endpoints_compatible #region-us 
 # # Fast-Inference with Ctranslate2
Speedup inference while reducing memory by 2x-4x using int8 inference in C++ on CPU or GPU.

quantized version of HuggingFaceH4/starchat-alpha

Converted on 2023-06-02 using


Checkpoint compatible to ctranslate2>=3.14.0
and hf-hub-ctranslate2>=2.0.8
- 'compute_type=int8_float16' for 'device="cuda"'
- 'compute_type=int8'  for 'device="cpu"' # Licence and other remarks:
This is just a quantized version. Licence conditions are intended to be idential to original huggingface repo. # Original description # Model Card for StarChat Alpha



StarChat is a series of language models that are fine-tuned from StarCoder to act as helpful coding assistants. StarChat Alpha is the first of these models, and as an alpha release is only intended for educational or research purpopses. In particular, the model has not been aligned to human preferences with techniques like RLHF, so may generate problematic content (especially when prompted to do so). ## Model Details ### Model Description



- Model type: A 16B parameter GPT-like model fine-tuned on a blend of the 'oasst1' and 'databricks-dolly-15k' datasets.
- Language(s) (NLP): English
- License: BigCode Open RAIL-M v1
- Finetuned from model: bigcode/starcoderbase ### Model Sources [optional]



- Repository: URL
- Demo: URL ## Uses



StarChat Alpha is intended for educational and/or research purposes and in that respect can be used to probe the programming capabilities of open-source language models. ## Bias, Risks, and Limitations



StarChat Alpha has not been aligned to human preferences with techniques like RLHF or deployed with in-the-loop filtering of responses like ChatGPT, so the model can produce problematic outputs (especially when prompted to do so). 
Models trained primarily on code data will also have a more skewed demographic bias commensurate with the demographics of the GitHub community, for more on this see the StarCoder dataset which is derived from The Stack.


Since the base model was pretrained on a large corpus of code, it may produce code snippets that are syntactically valid but semantically incorrect. 
For example, it may produce code that does not compile or that produces incorrect results.  
It may also produce code that is vulnerable to security exploits.  
We have observed the model also has a tendency to produce false URLs which should be carefully inspected before clicking.

StarChat Alpha was fine-tuned from the base model StarCoder Base, please refer to its model card's Limitations Section for relevant information. 
In particular, the model was evaluated on some categories of gender biases, propensity for toxicity, and risk of suggesting code completions with known security flaws; these evaluations are reported in its technical report. ## How to Get Started with the Model

Use the code below to get started with the model.





[optional]



BibTeX: