Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing

  • Log In
  • Sign Up

datasysdev
/
Code1

Text Generation
Transformers
TensorBoard
Safetensors
qwen3
Generated from Trainer
sft
trl
conversational
text-generation-inference
Model card Files Files and versions
xet
Metrics Training metrics Community

Instructions to use datasysdev/Code1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use datasysdev/Code1 with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("text-generation", model="datasysdev/Code1")
    messages = [
        {"role": "user", "content": "Who are you?"},
    ]
    pipe(messages)
    # Load model directly
    from transformers import AutoTokenizer, AutoModelForCausalLM
    
    tokenizer = AutoTokenizer.from_pretrained("datasysdev/Code1")
    model = AutoModelForCausalLM.from_pretrained("datasysdev/Code1")
    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]:]))
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps
  • vLLM

    How to use datasysdev/Code1 with vLLM:

    Install from pip and serve model
    # Install vLLM from pip:
    pip install vllm
    # Start the vLLM server:
    vllm serve "datasysdev/Code1"
    # Call the server using curl (OpenAI-compatible API):
    curl -X POST "http://localhost:8000/v1/chat/completions" \
    	-H "Content-Type: application/json" \
    	--data '{
    		"model": "datasysdev/Code1",
    		"messages": [
    			{
    				"role": "user",
    				"content": "What is the capital of France?"
    			}
    		]
    	}'
    Use Docker
    docker model run hf.co/datasysdev/Code1
  • SGLang

    How to use datasysdev/Code1 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 "datasysdev/Code1" \
        --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": "datasysdev/Code1",
    		"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 "datasysdev/Code1" \
            --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": "datasysdev/Code1",
    		"messages": [
    			{
    				"role": "user",
    				"content": "What is the capital of France?"
    			}
    		]
    	}'
  • Docker Model Runner

    How to use datasysdev/Code1 with Docker Model Runner:

    docker model run hf.co/datasysdev/Code1
Code1 / runs
673 kB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 8 commits
datasysdev's picture
datasysdev
Training in progress, epoch 5
19e9d0e verified 8 months ago
  • Sep13_19-01-48_959205344c76
    Training in progress, epoch 5 8 months ago
  • Sep13_19-14-02_4a44d92d347d
    Training in progress, epoch 5 8 months ago
  • Sep13_19-19-32_4a44d92d347d
    Training in progress, epoch 5 8 months ago
  • Sep13_19-20-38_4a44d92d347d
    Training in progress, epoch 5 8 months ago
  • Sep13_19-22-06_4a44d92d347d
    Training in progress, epoch 5 8 months ago
  • Sep13_19-35-52_a572dfad7f82
    Training in progress, epoch 5 8 months ago
  • Sep13_19-36-44_a572dfad7f82
    Training in progress, epoch 5 8 months ago
  • Sep13_19-39-12_a572dfad7f82
    Training in progress, epoch 5 8 months ago
  • Sep13_19-41-07_a572dfad7f82
    Training in progress, epoch 5 8 months ago
  • Sep13_19-42-59_a572dfad7f82
    Training in progress, epoch 5 8 months ago
  • Sep13_19-51-28_6a75134f9ac0
    Training in progress, epoch 5 8 months ago
  • Sep13_20-16-27_6a75134f9ac0
    Training in progress, epoch 2 8 months ago
  • Sep13_20-26-40_f848f5abb8d4
    Training in progress, epoch 5 8 months ago
  • Sep13_23-53-16_52d30559c8be
    Training in progress, epoch 5 8 months ago