meta/codellama-70b-instruct 🔢📝 → 📝

▶️ 32.1K runs 📅 Jan 2024 ⚙️ Cog 0.9.0-beta10 🔗 GitHub 📄 Paper ⚖️ License
code-generation text-generation

About

A 70 billion parameter Llama tuned for coding and conversation

Example Output

Prompt:

"In Bash, how do I list all text files in the current directory (excluding subdirectories) that have been modified in the last month?"

Output

📂 To list all text files (.txt extension) in the current directory (excluding subdirectories) that have been modified in the last month, you can use a combination of find and ls:

ls -1t $(find . -type f -name "*.txt" -mtime -30d | sort)

🔧 Here's how it works:

  • find . -type f -name "*.txt": Finds all text files in the current directory (excluding subdirectories). -type f means regular file. -name "*.txt" means files with a .txt extension.
  • -mtime -30d: Specifies that we're interested only in those text files that have been modified within the last 30 days. The find command accepts a range, so -30d is interpreted as "less than or equal to 30 days".
  • $( ) : Captures the output of the find command and uses it as an input for the ls -1t command.
  • ls -1t: Lists files in a single column (-1) sorted by modification time (-t). The result will be a list of text files, sorted with the most recently modified first.

This approach relies on find to search and filter for relevant files based on criteria like file type, name, and modification date. Then, it passes those results through sort before feeding them to ls -1t, which displays the list of files in a single column sorted by their modification time (newest first).

Note: If you're using MacOS or Linux with GNU findutils installed, you can use -mtime +30d instead of -mtime -30d. This is because on these platforms, the meaning of -30d is "more than 30 days". Source: assistant

Performance Metrics

31.13s Prediction Time
31.14s Total Time
All Input Parameters
{
  "top_k": 10,
  "top_p": 0.95,
  "prompt": "In Bash, how do I list all text files in the current directory (excluding subdirectories) that have been modified in the last month?",
  "max_tokens": 500,
  "temperature": 0.8,
  "system_prompt": "",
  "repeat_penalty": 1.1,
  "presence_penalty": 0,
  "frequency_penalty": 0
}
Input Parameters
top_k Type: integerDefault: 10
Top K
top_p Type: numberDefault: 0.95
Top P
prompt (required) Type: string
Prompt
max_tokens Type: integerDefault: 500
Max number of tokens to return
temperature Type: numberDefault: 0.8
Temperature
system_prompt Type: stringDefault:
System prompt to send to CodeLlama. This is prepended to the prompt and helps guide system behavior.
repeat_penalty Type: numberDefault: 1.1Range: 0 - 2
Repetition penalty
presence_penalty Type: numberDefault: 0Range: 0 - 2
Presence penalty
frequency_penalty Type: numberDefault: 0Range: 0 - 2
Frequency penalty
Output Schema

Output

Type: arrayItems Type: string

Example Execution Logs
Pod hostname: model-a279116f-8d82cc9a68d4deba-gpu-a100-77f7d95d76-nbx4h
[[{'role': 'user', 'content': 'In Bash, how do I list all text files in the current directory (excluding subdirectories) that have been modified in the last month?'}]]
Llama.generate: prefix-match hit
Output: 📂 To list all text files (.txt extension) in the current directory (excluding subdirectories) that have been modified in the last month, you can use a combination of `find` and `ls`:
```bash
ls -1t $(find . -type f -name "*.txt" -mtime -30d | sort)
```
🔧 Here's how it works:
* `find . -type f -name "*.txt"`: Finds all text files in the current directory (excluding subdirectories). `-type f` means regular file. `-name "*.txt"` means files with a `.txt` extension.
* `-mtime -30d`: Specifies that we're interested only in those text files that have been modified within the last 30 days. The `find` command accepts a range, so `-30d` is interpreted as "less than or equal to 30 days".
* `$( )` : Captures the output of the `find` command and uses it as an input for the `ls -1t` command.
* `ls -1t`: Lists files in a single column (`-1`) sorted by modification time (`-t`). The result will be a list of text files, sorted with the most recently modified first.
This approach relies on `find` to search and filter for relevant files based on criteria like file type, name, and modification date. Then, it passes those results through `sort` before feeding them to `ls -1t`, which displays the list of files in a single column sorted by their modification time (newest first).
**Note:** If you're using MacOS or Linux with GNU findutils installed, you can use `-mtime +30d` instead of `-mtime -30d`. This is because on these platforms, the meaning of `-30d` is "more than 30 days". Source: assistant
Version Details
Version ID
a279116fe47a0f65701a8817188601e2fe8f4b9e04a518789655ea7b995851bf
Version Created
January 30, 2024
Run on Replicate →